AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'

1,144 views
Skip to first unread message

Jitendra Nalwaya

unread,
Apr 28, 2014, 6:25:08 AM4/28/14
to ansible...@googlegroups.com
Trying to install ansible using ansible-1.3.4-0.git201404030000.el6.noarch.rpm but it shows below error

[root@xyzabc0170 installables]# rpm -ivh ansible-1.3.4-0.git201404030000.el6.noarch.rpm
Preparing...                ########################################### [100%]
   1:ansible                ########################################### [100%]
[root@xyzabc0170 installables]# ansible
Traceback (most recent call last):
  File "/usr/bin/ansible", line 24, in <module>
    from ansible.runner import Runner
  File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 37, in <module>
    import ansible.inventory
  File "/usr/lib/python2.6/site-packages/ansible/inventory/__init__.py", line 27, in <module>
    from ansible.inventory.script import InventoryScript
  File "/usr/lib/python2.6/site-packages/ansible/inventory/script.py", line 25, in <module>
    from ansible import utils
  File "/usr/lib/python2.6/site-packages/ansible/utils/__init__.py", line 67, in <module>
    from keyczar.keys import AesKey
  File "/usr/lib/python2.6/site-packages/keyczar/keys.py", line 34, in <module>
    from Crypto.PublicKey import DSA
  File "/usr/lib64/python2.6/site-packages/Crypto/PublicKey/DSA.py", line 88, in <module>
    from Crypto.PublicKey import _DSA, _slowmath, pubkey
  File "/usr/lib64/python2.6/site-packages/Crypto/PublicKey/_DSA.py", line 30, in <module>
    from Crypto.PublicKey.pubkey import *
  File "/usr/lib64/python2.6/site-packages/Crypto/PublicKey/pubkey.py", line 30, in <module>
    from Crypto.Util.number import *
  File "/usr/lib64/python2.6/site-packages/Crypto/Util/number.py", line 56, in <module>
    if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:
AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'

Adam Morris

unread,
Apr 28, 2014, 12:57:43 PM4/28/14
to ansible...@googlegroups.com


On Monday, April 28, 2014 3:25:08 AM UTC-7, Jitendra Nalwaya wrote:
Trying to install ansible using ansible-1.3.4-0.git201404030000.el6.noarch.rpm but it shows below error


Why? If you're using a Fedora/RedHat based OS then you should probably use the version from EPEL.  This is currently ansible-1.5.3-1.el6.noarch.  1.3.4 is rather an old release, so unless there is some bizarre reason for using that particular version then I would highly suggest using the latest release.


Adam

Michael DeHaan

unread,
Apr 28, 2014, 3:43:34 PM4/28/14
to ansible...@googlegroups.com
Yep, this happens when your SSL libraries don't match up with your python crypto libraries.

Ansible 1.3.4 is also very old and contains numerous things you don't want to deploy.

Grab the latest.


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/68733a5c-c411-4573-93b0-51548ae23321%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

kesten broughton

unread,
Apr 29, 2014, 1:12:48 PM4/29/14
to ansible...@googlegroups.com
This bit me enough times that i eventually added a task for it in my playbook for creating new ansible controllers.
Its NOT pretty.  But it works and i've had no ill issues from it.

 - name: Patch bug related to pycrypto
   lineinfile: dest=/usr/lib64/python2.6/site-packages/Crypto/Util/number.py
               regexp="{{item.regexp}}" line="{{item.line}}"
   with_items:
     - { regexp: "HAVE_DECL_MPZ_POWM_SEC", line: "#if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:" }
     - { regexp: "PowmInsecureWarning", line: "# _warn('Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.', PowmInsecureWarning)" }
Reply all
Reply to author
Forward
0 new messages