Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: python2-crypto-2.6.1-13 fails to install on CentOS Linux release 7.3.1611 Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Run yum update Actual results: Expected results: Additional info: Running transaction Installing : python2-crypto-2.6.1-13.el7.x86_64 1/1 Error unpacking rpm package python2-crypto-2.6.1-13.el7.x86_64 error: unpacking of archive failed on file /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info: cpio: rename Verifying : python2-crypto-2.6.1-13.el7.x86_64 1/1 Failed: python2-crypto.x86_64 0:2.6.1-13.el7
Hmm, I wonder what you already have there; a directory or a symlink? # ls -l /usr/lib64/python2.7/site-packages/
[root@gwendis ~]# ls -l /usr/lib64/python2.7/site-packages/pycrypto* ---------- 1 root root 666 Oct 16 2016 /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info;5803dcdf -rw-r--r-- 1 root root 666 Jan 18 14:31 /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info;589d8fb7 -rw-r--r-- 1 root root 666 Jan 18 14:31 /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info;5901c19c -rw-r--r-- 1 root root 666 Jan 18 14:31 /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info;5901ec5e /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info: total 32 -rw-r--r-- 1 root root 1 Jul 21 2016 dependency_links.txt -rw-r--r-- 1 root root 9076 Jul 21 2016 installed-files.txt -rw-r--r-- 1 root root 666 Jul 21 2016 PKG-INFO -rw-r--r-- 1 root root 5918 Jul 21 2016 SOURCES.txt -rw-r--r-- 1 root root 7 Jul 21 2016 top_level.txt
Let's see where that existing directory comes from: # rpm -qf /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info Did you previously install python-crypto/pycrypto from anywhere, either via rpm or other method?
[root@gwendis ~]# rpm -qf /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info file /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info is not owned by any package I don't think I would have installed this manually at any time.
Can you delete or move out of the way (to some other temp directory perhaps) the files/dirs /usr/lib64/python2.7/site-packages/pycrypto* and then try installing the package?
This seems to have worked: [root@gwendis ~]# mv /usr/lib64/python2.7/site-packages/pycrypto* /tmp/ [root@gwendis ~]# yum install python2-crypto Loaded plugins: changelog, fastestmirror Loading mirror speeds from cached hostfile * epel: mirrors.cat.pdx.edu * extras: mirrors.sonic.net * nux-dextop: li.nux.ro * updates: mirror.chpc.utah.edu Resolving Dependencies --> Running transaction check ---> Package python2-crypto.x86_64 0:2.6.1-13.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================= Package Arch Version Repository Size ========================================================================================================================================================= Installing: python2-crypto x86_64 2.6.1-13.el7 epel 476 k Transaction Summary ========================================================================================================================================================= Install 1 Package Total download size: 476 k Installed size: 2.2 M Is this ok [y/d/N]: y Downloading packages: python2-crypto-2.6.1-13.el7.x86_64.rpm | 476 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : python2-crypto-2.6.1-13.el7.x86_64 1/1 Verifying : python2-crypto-2.6.1-13.el7.x86_64 1/1 Installed: python2-crypto.x86_64 0:2.6.1-13.el7 Complete! [root@gwendis ~]#
I'd guess that someone installed it directly from upstream on 21-07-2016, which would install the software OK (less any security patches) but not satisfy any RPM dependencies. Anyway, seems OK now, yes?
(In reply to Paul Howarth from comment #7) > I'd guess that someone installed it directly from upstream on 21-07-2016, I think https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe should lower the odds of such things happening, no?
(In reply to Pavel Cahyna from comment #8) > (In reply to Paul Howarth from comment #7) > > I'd guess that someone installed it directly from upstream on 21-07-2016, > > I think https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe should > lower the odds of such things happening, no? Well not really, since that's all about python3 ...
OK, closing this now as it appears to have been an issue local to the reporter.
(In reply to Paul Howarth from comment #10) > OK, closing this now as it appears to have been an issue local to the > reporter. ############################################################### This is a bug. I can reproduce it on several RHEL 7.5 servers. Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Updating: ansible noarch 2.5.2-1.el7 epel 9.0 M Installing for dependencies: python2-crypto x86_64 2.6.1-15.el7 rhel-7-server-extras-rpms 477 k Transaction Summary ================================================================================ Install ( 1 Dependent package) Upgrade 1 Package Total size: 9.5 M Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : python2-crypto-2.6.1-15.el7.x86_64 1/3Error unpacking rpm package python2-crypto-2.6.1-15.el7.x86_64 error: unpacking of archive failed on file /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info: cpio: rename Updating : ansible-2.5.2-1.el7.noarch 2/3 error: python2-crypto-2.6.1-15.el7.x86_64: install failed Cleanup : ansible-2.5.1-1.el7.noarch 3/3 Verifying : ansible-2.5.2-1.el7.noarch 1/3 Verifying : python2-crypto-2.6.1-15.el7.x86_64 2/3 Verifying : ansible-2.5.1-1.el7.noarch 3/3 Updated: ansible.noarch 0:2.5.2-1.el7 Failed: python2-crypto.x86_64 0:2.6.1-15.el7 Complete! Warning: yum update failed. continuing anyway.
By the way, it is IMO a bug that EPEL ansible requires python(2)-crypto. (And the version in Extras is deprecated and it is better to not use it.)
(In reply to Pavel Cahyna from comment #12) > By the way, it is IMO a bug that EPEL ansible requires python(2)-crypto. > (And the version in Extras is deprecated and it is better to not use it.) python-crypto is pretty much dead upstream anyway so anyone currently using it would be better switching to pycryptodome. Regarding Comment#11 (Max), this seems to be a fresh install of python2-crypto from rhel-7-server-extras-rpms (not EPEL), so what is it conflicting with? What owns /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info in the existing system?
I'm using one of our templates that's about 1 year old to create the servers. Now I'm a bit more confused: yum remove python2-crypto.x86_64 Loaded plugins: enabled_repos_upload, fastestmirror, langpacks, package_upload, product-id, search-disabled-repos, subscription-manager No Match for argument: python2-crypto.x86_64 No Packages marked for removal Uploading Enabled Repositories Report Loaded plugins: fastestmirror, langpacks, product-id, subscription-manager
See Comment#3 to see if the conflict is from an existing rpm, and if not, Comment#5 to work around the conflict.