• Home »
  • Errors »
  • Error: Missing Dependency: libffi.so.5 is needed by package python26-2.6.2-2.i386

Error: Missing Dependency: libffi.so.5 is needed by package python26-2.6.2-2.i386

One of the annoying things about CentOS Linux is the current dependency on Python version 2.4. Typically I install Python version 2.6 and compile new programs using the 2.6 version of python instead of the 2.4 version. Recently on a server I had just installed CentOS 5.4 on I had a dependency issue when attempting to install python version 2.6 from the CHL repository. Below I display the error and describe how to install the libffi package on CentOS Linux.

CentOS Missing Dependency Error Caused By No libffi.so.5:

bash

  1. [root@devtools yum.repos.d]# yum install python26
  2. Loaded plugins: fastestmirror
  3. Loading mirror speeds from cached hostfile
  4.  * addons: mira.sunsite.utk.edu
  5.  * base: mirrors.gigenet.com
  6.  * extras: www.ontime1405.com
  7.  * rpmforge: apt.sw.be
  8.  * updates: mirror.steadfast.net
  9. Setting up Install Process
  10. Resolving Dependencies
  11. --> Running transaction check
  12. ---> Package python26.i386 0:2.6.2-2 set to be updated
  13. --> Processing Dependency: libpython2.6.so.1.0 for package: python26
  14. --> Processing Dependency: libffi.so.5 for package: python26
  15. --> Running transaction check
  16. ---> Package python26.i386 0:2.6.2-2 set to be updated
  17. --> Processing Dependency: libffi.so.5 for package: python26
  18. ---> Package python26-libs.i386 0:2.6.2-2 set to be updated
  19. --> Finished Dependency Resolution
  20. python26-2.6.2-2.i386 from chl-source has depsolving problems
  21.   --> Missing Dependency: libffi.so.5 is needed by package python26-2.6.2-2.i386 (chl-source)
  22. Error: Missing Dependency: libffi.so.5 is needed by package python26-2.6.2-2.i386 (chl-source)
  23.  You could try using --skip-broken to work around the problem
  24.  You could try running: package-cleanup --problems
  25.                         package-cleanup --dupes
  26.                         rpm -Va --nofiles --nodigest
  27. The program package-cleanup is found in the yum-utils package.

As you can see above the “Missing Dependency” error is caused by libffi.so.5 not being installed. One of the prerequisites for installing packages from the CHL repository is to have the EPEL repository installed. The EPEL repository includes the libffi and libffi-devel packages that can be installed to resolve the above dependency error. Use the command below to install the EPEL yum repository.

Install EPEL Repository To Install The libffi RPM Package Using Yum:

bash

  1. rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

Now that the EPEL yum repository is installed you can install the libffi RPM package on CentOS Linux. Below is an example of the output when installing libffi. If this is your first time using the EPEL repo you will be asked if you want to import the EPEL GPG key which is also displayed below.

Install libffi On CentOS Linux:

bash

  1. [root@dev ~]# yum install libffi
  2. Loading "allowdowngrade" plugin
  3. Loading "fastestmirror" plugin
  4. Loading mirror speeds from cached hostfile
  5.  * epel: ftp.osuosl.org
  6.  * chl: yum.chrislea.com
  7.  * c5-testing: dev.centos.org
  8.  * rpmforge: apt.sw.be
  9.  * base: mirror.cisp.com
  10.  * updates: ftp.osuosl.org
  11. Setting up Install Process
  12. Parsing package install arguments
  13. Resolving Dependencies
  14. --> Running transaction check
  15. ---> Package libffi.i386 0:3.0.5-1.el5 set to be updated
  16. --> Finished Dependency Resolution
  17.  
  18. Dependencies Resolved
  19.  
  20. =============================================================================
  21.  Package                 Arch       Version          Repository        Size
  22. =============================================================================
  23. Installing:
  24.  libffi                  i386       3.0.5-1.el5      epel               21 k
  25.  
  26. Transaction Summary
  27. =============================================================================
  28. Install      1 Package(s)
  29. Update       0 Package(s)
  30. Remove       0 Package(s)
  31.  
  32. Total download size: 21 k
  33. Is this ok [y/N]: y
  34. Downloading Packages:
  35. (1/1): libffi-3.0.5-1.el5 100% |=========================|  21 kB    00:00
  36. warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6
  37. Importing GPG key 0x217521F6 "Fedora EPEL <epel@fedoraproject.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
  38. Is this ok [y/N]: y
  39. Running rpm_check_debug
  40. Running Transaction Test
  41. Finished Transaction Test
  42. Transaction Test Succeeded
  43. Running Transaction
  44.   Installing: libffi                       ######################### [1/1]
  45.  
  46. Installed: libffi.i386 0:3.0.5-1.el5
  47. Complete!
  48. You have new mail in /var/spool/mail/root

After installing libffi I was able to then install the python26 packages from the CHL repository which provided access to python version 2.6 using the python26 command.

The Definitive Guide to CentOS (Books for Professionals by Professionals) (Paperback)


List Price: $39.99 USD
New From: $24.06 USD In Stock
Used from: $0.54 USD In Stock

Foundations of CentOS Linux: Enterprise Linux On the Cheap (Books for Professionals by Professionals) (Paperback)


List Price: $42.99 USD
New From: $24.99 USD In Stock
Used from: $1.19 USD In Stock

Share