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兼容性报错解决办法的更多相关文章

  1. ZABBIX安装过程中relocation error报错解决办法

    错误提示: /usr/sbin/zabbix_server: relocation error: /usr/sbin/zabbix_server: symbol mysql_next_result, ...

  2. spring boot jpa 使用update 报错解决办法

    在spring boot jpa 中自定义sql,执行update操作报错解决办法: 在@Query(...)上添加 @Modifying@Transactional注解

  3. R语言安装openxl包报错解决办法

    在R语言中使用openxlsx包,会报错 解决办法就是: 下载安装Set-Rtool,安装时注意勾选对话框 然后在R中运行以下代码: Sys.setenv("R_ZIPCMD" = ...

  4. springboot x.x.x RELEASE pom 第一行报错解决办法

    springboot x.x.x RELEASE pom 第一行报错解决办法 在pom.xml 文件的properties中加入maven jar插件的版本号 <properties> & ...

  5. sphinx :undefined reference to `libiconv' 报错解决办法

    sphinx :undefined reference to `libiconv' 报错解决办法   2013-11-30 21:45:39 安装sphinx时不停报错...郁闷在make时报错,错误 ...

  6. sysctl -P 报错解决办法

    sysctl -P 报错解决办法问题症状修改 linux 内核文件 #vi /etc/sysctl.conf后执行sysctl  -P 报错error: "net.bridge.bridge ...

  7. 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 ...

  8. Authentication token manipulation error报错解决办法

    Authentication token manipulation error报错解决办法 #参考http://blog.163.com/junwu_lb/blog/static/1916798920 ...

  9. npm install 报错解决办法

    npm install 报错解决办法 原因是因为node_modules可能有意外改动,导致依赖库不完整,删除项目下的node_modules,在你的项目目录下,重新执行npm install,这会重 ...

随机推荐

  1. JAVA将单词首字母大写方法

    public class FirstLetterUppercase { public static void main(String[] args){ System.out.println(new F ...

  2. [转载] About Career Promotion and Tutoring from Zhihu Web FAQer (Quoted Entirely Without Personal Idea. Delete Immediately If Pirated)

    问题: 如何下列各类公司的互联网IT类工作待遇排名? 下列各公司岗位待遇序号从小到大依次降低: 美国互联网总部special offer(15万刀起薪) : 股份制银行总行,证券公司,基金公司IT部门 ...

  3. SpringBoot Maven项目 Helloworld 测试

    SpringBoot 化繁为简,简化配置 SpringBoot官方:http://projects.spring.io/spring-boot/SpringBoot使用介绍:http://blog.c ...

  4. 电脑快捷键与JAVA关键字、运算符

    电脑快捷键: Alt+ESC切换到上一个操作的窗口 Alt+F4关闭当前窗口 Print Screen截取当前全屏幕到剪切板 Alt+Print Screen截取当前窗口到剪切板 Alt+Shift在 ...

  5. 计时器---JS

    <script type="text/javascript"> function count(){ var a=document.getElementById(&quo ...

  6. 【计算机视觉】KCF算法

    code opencv3.3.1-contrib  ---- TrackerKCF.cpp opencv如何更新目标区域的过程: // calculate filter response if(par ...

  7. 20155208徐子涵 2016-2017-2 《Java程序设计》第10周学习总结

    #### **教材学习总结**网络编程 网络编程就是在两个或两个以上的设备(例如计算机)之间传输数据.程序员所作的事情就是把数据发送到指定的位置,或者接收到指定的数据,这个就是狭义的网络编程范畴. * ...

  8. meta viewport的原理

    https://blog.csdn.net/zhouziyu2011/article/details/60570547

  9. MySQL数据库-表内容操作

    1.表内容增加 insert into 表 (列名,列名...) values (值,值,值...); 添加表内容添加一条数据 insert into 表 (列名,列名...) values (值,值 ...

  10. myeclipse从svn导入文件报错:

    Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Pr ...