Aasible中cryptography兼容性报错解决办法
Aasible中cryptography兼容性报错解决办法
1 Ansible中使用ansible --version查看版本,报错信息如下:
ERROR! Unexpected Exception, this is probably a bug: (cryptography 0.8. (/usr/lib64/python2./site-packages), Requirement.parse('cryptography>=1.1'))
the full traceback was:
Traceback (most recent call last):
File "/usr/bin/ansible", line , in <module>
mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
File "/usr/lib/python2.7/site-packages/ansible/cli/__init__.py", line , in <module>
from ansible.inventory.manager import InventoryManager
File "/usr/lib/python2.7/site-packages/ansible/inventory/manager.py", line , in <module>
from ansible.plugins.loader import inventory_loader
File "/usr/lib/python2.7/site-packages/ansible/plugins/loader.py", line , in <module>
from ansible.parsing.utils.yaml import from_yaml
File "/usr/lib/python2.7/site-packages/ansible/parsing/utils/yaml.py", line , in <module>
from ansible.parsing.yaml.loader import AnsibleLoader
File "/usr/lib/python2.7/site-packages/ansible/parsing/yaml/loader.py", line , in <module>
from ansible.parsing.yaml.constructor import AnsibleConstructor
File "/usr/lib/python2.7/site-packages/ansible/parsing/yaml/constructor.py", line , in <module>
from ansible.parsing.vault import VaultLib
File "/usr/lib/python2.7/site-packages/ansible/parsing/vault/__init__.py", line , in <module>
from cryptography.hazmat.backends import default_backend
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/__init__.py", line , in <module>
import pkg_resources
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line , in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line , in resolve
raise VersionConflict(dist,req) # XXX put more info here
VersionConflict: (cryptography 0.8. (/usr/lib64/python2./site-packages), Requirement.parse('cryptography>=1.1'))
2 分析报错原因:
最后一句Requirement.parse('cryptography>=1.1')),得知cryptography的版本过低,需要升级,安装cryptography需要通过pip安装,所以需要先安装pip。
3 pip安装
下载:wget https://files.pythonhosted.org/packages/69/81/52b68d0a4de760a2f1979b0931ba7889202f302072cc7a0d614211bc7579/pip-18.0.tar.gz
解压:tar -zxvf pip-18.0.tar.gz
进入目录:cd pip-18.0
安装:python setup.py install
4 安装wheel
下载:wget https://files.pythonhosted.org/packages/2a/fb/aefe5d5dbc3f4fe1e815bcdb05cbaab19744d201bbc9b59cfa06ec7fc789/wheel-0.31.1.tar.gz
解压:tar -zxvf wheel-0.31..tar.gz
进入目录:cd wheel-0.31./
安装:python setup.py install
5 安装cryptography
下载:wget https://files.pythonhosted.org/packages/87/e6/915a482dbfef98bbdce6be1e31825f591fc67038d4ee09864c1d2c3db371/cryptography-2.3.1-cp27-cp27mu-manylinux1_x86_64.whl
安装:pip install cryptography-2.3.-cp27-cp27mu-manylinux1_x86_64.whl
6. 测试是否还有问题
[root@]# ansible --version
ansible 2.6.
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2./site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7. (default, Nov , ::) [GCC 4.8. (Red Hat 4.8.-)]
Aasible中cryptography兼容性报错解决办法的更多相关文章
- ZABBIX安装过程中relocation error报错解决办法
错误提示: /usr/sbin/zabbix_server: relocation error: /usr/sbin/zabbix_server: symbol mysql_next_result, ...
- spring boot jpa 使用update 报错解决办法
在spring boot jpa 中自定义sql,执行update操作报错解决办法: 在@Query(...)上添加 @Modifying@Transactional注解
- R语言安装openxl包报错解决办法
在R语言中使用openxlsx包,会报错 解决办法就是: 下载安装Set-Rtool,安装时注意勾选对话框 然后在R中运行以下代码: Sys.setenv("R_ZIPCMD" = ...
- springboot x.x.x RELEASE pom 第一行报错解决办法
springboot x.x.x RELEASE pom 第一行报错解决办法 在pom.xml 文件的properties中加入maven jar插件的版本号 <properties> & ...
- sphinx :undefined reference to `libiconv' 报错解决办法
sphinx :undefined reference to `libiconv' 报错解决办法 2013-11-30 21:45:39 安装sphinx时不停报错...郁闷在make时报错,错误 ...
- sysctl -P 报错解决办法
sysctl -P 报错解决办法问题症状修改 linux 内核文件 #vi /etc/sysctl.conf后执行sysctl -P 报错error: "net.bridge.bridge ...
- sysctl -P 报错解决办法 error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown keyerror: "net.bridge.brid ...
- Authentication token manipulation error报错解决办法
Authentication token manipulation error报错解决办法 #参考http://blog.163.com/junwu_lb/blog/static/1916798920 ...
- npm install 报错解决办法
npm install 报错解决办法 原因是因为node_modules可能有意外改动,导致依赖库不完整,删除项目下的node_modules,在你的项目目录下,重新执行npm install,这会重 ...
随机推荐
- java学习笔记25(Collections类)
Collections算法类: Collections是一个算法类,提供了一系列静态方法,实现对集合的排序.替换.交换.搜索.拷贝等操作: 用法:Collections.方法名(要操作的集合): 就像 ...
- git解决not a git repository
意思是说没有库,需要你创建 git init zzz zzz文件夹就会出现在你的项目中,里面就会有.git文件,将里面的.git剪切到与项目同一级中 关注微信小程序
- 【git学习笔记】
一.查看git的配置文件 1.在项目下,有一个.git的隐藏文件 2.config为git的配置文件 3.查看config :branch表示分支,此配置文件表示当前有两个分支NNU和master,一 ...
- 安装Cygwin,,以及遇到的问题
实验需要用到Cygwin,于是去下了一个,安装过程比较顺利,参考:http://blog.csdn.net/chunleixiahe/article/details/55666792 但是发现 ma ...
- input默认显示当前时间
方法一: // 获取当天的年月日 new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().get ...
- Python之路PythonNet,第一篇,网络1
pythonnet 网络1 ARPAnet(互联网雏形)---> 民用 ISO(国际标准化组织)--->网络体系结构标准 OSI模型 OSI : 网络信息传输比较复杂需要很多功能协同 ...
- 【CSP】字符与int
[转自https://yq.aliyun.com/articles/19153] WIKIOI-1146 ISBN号码 光仔december 2014-03-01 16:20:00 浏览479 评 ...
- Linux命令学习之路——档案拷贝:cp
使用权限:所有角色 使用方式:cp [ -arf ] source dest / cp [ -arf ] source... Directory 作用:把一个档案拷贝到另一个档案(档案复制),或将多个 ...
- 阮一峰关于reduce 和transduce的博客
http://www.ruanyifeng.com/blog/2017/03/reduce_transduce.html
- POJ 2751:Seek the Name, Seek the Fame(Hash)
Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 24077 Ac ...