[ansible学习笔记]Error: ansible requires the stdlib json or simplejson module, neither was found!
2017-02-28 22:16
579 查看
1、执行ansible命令的时候客户端rhel56-192.168.209.133 出现以下错误:
4、解决办法,二选一:
1)升级客户端的python版本至python2.5.x及以上
2)客户端上安装python-simplejson
附官方说明:
托管节点要求:
通常我们使用 ssh 与托管节点通信,默认使用 sftp.如果 sftp 不可用,可在 ansible.cfg 配置文件中配置成 scp 的方式. 在托管节点上也需要安装 Python 2.4 或以上的版本.如果版本低于 Python 2.5 ,还需要额外安装一个模块:
● python-simplejson
● 没安装python-simplejson,也可以使用Ansible的”raw”模块和script模块,因此从技术上讲,你可以通过Ansible的”raw”模块安装python-simplejson,之后就可以使用Ansible的所有功能了.
[root@reedoracle ansible]# ansible all -m command -a "python -V" -u reed SSH password: rhel56-192.168.209.133 | FAILED | rc=0 >> Error: ansible requires the stdlib json or simplejson module, neither was found!2、查看该客户端的python版本:
[root@localhost ~]# python -V Python 2.4.33、错误原因:python版本过低
4、解决办法,二选一:
1)升级客户端的python版本至python2.5.x及以上
2)客户端上安装python-simplejson
附官方说明:
托管节点要求:
通常我们使用 ssh 与托管节点通信,默认使用 sftp.如果 sftp 不可用,可在 ansible.cfg 配置文件中配置成 scp 的方式. 在托管节点上也需要安装 Python 2.4 或以上的版本.如果版本低于 Python 2.5 ,还需要额外安装一个模块:
● python-simplejson
● 没安装python-simplejson,也可以使用Ansible的”raw”模块和script模块,因此从技术上讲,你可以通过Ansible的”raw”模块安装python-simplejson,之后就可以使用Ansible的所有功能了.
相关文章推荐
- ansible操作远程服务器报Error: ansible requires the stdlib json or simplejson module, neither was found!
- ansible requires the stdlib json or simplejson module, neither was found!
- ./configure: error: the HTTP rewrite module requires the PCRE library 解决方法
- CentOS安装Nginx 报错“configure: error: the HTTP rewrite module requires the PCRE library”解决办法
- ./configure: error: the HTTP rewrite module requires the PCRE library
- ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zope.interface.
- ./configure: error: the HTTP rewrite module requires the PCRE library.
- ./configure: error: the HTTP rewrite module requires the PCRE library
- ./configure: error: the HTTP rewrite module requires the PCRE library
- ngingx安装错误 ./configure: error: the HTTP rewrite module requires the PCRE library.
- ImportError: No module named simplejson.scanner
- ./configure: error: the HTTP rewrite module requires the PCRE library解决
- 【原】java学习笔记 【二】 常见错误 Class files on classpath not found or not accessible for
- [轉]java学习笔记 【二】 常见错误 Class files on classpath not found or not accessible for
- ubuntu安装nginx时提示error: the HTTP rewrite module requires the PCRE library
- nginx configure error: the HTTP rewrite module requires the PCRE library
- The way to fix error: Lexical or Preprocessor Issue 'libxml/xmlversion.h' file not found
- ./configure: error: the HTTP rewrite module requires the PCRE library
- ubuntu下安装nginx错误error: the HTTP rewrite module requires the PCRE library 解决方法
- Nginx编译安装错误error: the HTTP gzip module requires the zlib library