Problem Description:
System: CentOS 6.x
Yum-y Install Ansible
Run ansible command, after error:
Ansible all-m Ping
/usr/lib64/python2.6/site-packages/crypto/util/number.py:57: Powminsecurewarning:not using Mpz_powm_sec. You should rebuild using LIBGMP >= 5 to avoid timing attack vulnerability.
_warn ("Not using MPZ_POWM_SEC. You should rebuild using LIBGMP >= 5 to avoid timing attack vulnerability. ", powminsecurewarning)
Slightly......
First of all this is not an error message, but a security message, is that the system comes with the GMP library version is too low, vulnerable to attack, need to upgrade to the GMP 5.x, which is due to the use of Epel source installation ansible caused by a bug, this is the relevant description URL:
https://github.com/ansible/ansible/issues/6941
Looking for a long time on the internet, but also tried many times, but are not successful, the basic idea is to upgrade the GMP, and reinstall Python related modules in a way to repair, in fact, the solution is very simple, in the warning message has been told the warning file location, as long as the comment out the relevant information can be.
Workaround:
Cp/usr/lib64/python2.6/site-packages/crypto/util/number.py{,.bak}
Sed-i "s/^if/#&/"/usr/lib64/python2.6/site-packages/crypto/util/number.py
Run ansible again, there is no warning displayed.
Note:
Through the source mode installation, you can avoid this problem, the relevant website:
Http://ansible-tran.readthedocs.io/en/latest/docs/intro_installation.html#githubansible
If you want to suppress spurious warnings/errors, use (for ignoring warning messages):
$ source./hacking/env-setup-q
This article is from the top leaderboard blog, so be sure to keep this source http://top88.blog.51cto.com/11341662/1885169
You should rebuild using LIBGMP = 5 To avoid timing attack vulnerability.