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:
[root@devtools yum.repos.d]# yum install python26 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mira.sunsite.utk.edu * base: mirrors.gigenet.com * extras: www.ontime1405.com * rpmforge: apt.sw.be * updates: mirror.steadfast.net Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package python26.i386 0:2.6.2-2 set to be updated --> Processing Dependency: libpython2.6.so.1.0 for package: python26 --> Processing Dependency: libffi.so.5 for package: python26 --> Running transaction check ---> Package python26.i386 0:2.6.2-2 set to be updated --> Processing Dependency: libffi.so.5 for package: python26 ---> Package python26-libs.i386 0:2.6.2-2 set to be updated --> Finished Dependency Resolution python26-2.6.2-2.i386 from chl-source has depsolving problems --> Missing Dependency: libffi.so.5 is needed by package python26-2.6.2-2.i386 (chl-source) Error: Missing Dependency: libffi.so.5 is needed by package python26-2.6.2-2.i386 (chl-source) You could try using --skip-broken to work around the problem You could try running: package-cleanup --problems package-cleanup --dupes rpm -Va --nofiles --nodigest 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:
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:
[root@dev ~]# yum install libffi Loading "allowdowngrade" plugin Loading "fastestmirror" plugin Loading mirror speeds from cached hostfile * epel: ftp.osuosl.org * chl: yum.chrislea.com * c5-testing: dev.centos.org * rpmforge: apt.sw.be * base: mirror.cisp.com * updates: ftp.osuosl.org Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package libffi.i386 0:3.0.5-1.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: libffi i386 3.0.5-1.el5 epel 21 k Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 21 k Is this ok [y/N]: y Downloading Packages: (1/1): libffi-3.0.5-1.el5 100% |=========================| 21 kB 00:00 warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6 Importing GPG key 0x217521F6 "Fedora EPEL <firstname.lastname@example.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: libffi ######################### [1/1] Installed: libffi.i386 0:3.0.5-1.el5 Complete! 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.