ansible安装遇到"AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'"的问题
来源:互联网 发布:网络推广职责 编辑:程序博客网 时间:2024/06/13 16:40
Ansible是时下比较流行的自动化运维工具,是用Python编写的。
我的系统是Ubuntu 16.04.3 LTS。
用以下命令安装:
$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible
安装过程是非常顺利的。但在测试运行:
$sudo ansible all -m ping
时,却遇到了:
AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'
的问题。在Overflow找到的解答,说这是urllib3 1.10前的版本造成的,但我的urllib是1.2版本。但Overflow上提供了强制升级requests的解决方案。
我查了以下已安装模块的版本:
python-apt (1.1.0b1)
python-dateutil (2.5.3)
python-debian (0.1.27)
python-editor (1.0)
pytz (2016.4)
pyxdg (0.25)
PyYAML (3.11)
requests (2.3.0)
scipy (0.17.0)
确实requests的版本是偏低的。首先卸载pyopenssl,然后:
pip install requests==2.6.0
然后重新安装pyopenssl。
再重新运行:
$sudo ansible all -m ping
显示:localhost | SUCCESS => {
"changed": false,
"ping": "pong"
}
问题解决。
- ansible安装遇到"AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'"的问题
- Debian (Jessie 8.0) 的修复pip AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'
- AttributeError: ‘module’ object has no attribute’ 问题
- window安装uwsgi 遇到AttributeError: 'module' object has no attribute 'uname' 完美解决
- AttributeError: 'module' object has no attribute 'post'问题
- 【TensorFlow问题】AttributeError:'module' object has no attribute 'mul'
- 问题AttributeError: ‘module’ object has no attribute ‘sub’
- 【TensorFlow问题】AttributeError:'module' object has no attribute 'mul'
- AttributeError: 'module' object has no attribute 'getpass'
- AttributeError: 'module' object has no attribute 'Serial'
- AttributeError: 'module' object has no attribute(转)
- AttributeError: 'module' object has no attribute 'randint'
- AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'
- AttributeError: 'module' object has no attribute 'Serial'
- AttributeError: 'module' object has no attribute 'LabelMap'
- AttributeError: 'module' object has no attribute 'XXX'
- AttributeError: 'module' object has no attribute 'urlopen'
- AttributeError:'module' object has no attribute 'classify'
- 如何使用java程序操作ActiveMQ
- Python Day2 字符串
- 数据结构实验之排序四:寻找大富翁
- unity详细解说Mecanim使用 动作 Animator
- spring中关于不能 new ClassPathXmlApplicationContext("");的问题
- ansible安装遇到"AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'"的问题
- git基本使用
- php生成 文字水印 图片水印
- 阻塞与非阻塞的区别
- Retry重试机制
- 备份短信与回调
- 密码学复习笔记3【分组密码/AES、ECB、CBC、CFB、OFB、CTR】
- 深度学习在股票市场的应用
- C语言scanf函数用法详细解释!!!