Home / Getting Transaction Check Error with Yum

Getting Transaction Check Error with Yum

I needed to install the MSSQL libraries for PHP on a CentOS 5 server and ran into a few issues when installing some of the required dependencies, getting "Transaction Check Error" error messages which indicated conflicts between files in packages.

I had been following through the instructions for installing the MS SQL libraries for PHP at my post and the HowtoForge post, and had the same issue as I’d had the last time: when running "rpmbuild -bb ./php.spec" I had some dependency issues, so went to yum-install them:

$ yum install bzip2-devel curl-devel gmp-devel aspell-devel libjpeg-devel libpng-devel 
    pam-devel openssl-devel sqlite-devel zlib-devel pcre-devel krb5-devel libc-client-devel 
    mysql-devel postgresql-devel unixODBC-devel libxml2-devel net-snmp-devel libxslt-devel 
    libxml2-devel ncurses-devel gd-devel freetype-devel

However, this time the packages didn’t install nicely, and I got this error message instead:

Transaction Check Error:
  file /etc/krb5.conf from install of krb5-libs-1.6.1-17.el5 conflicts with file from package krb5-libs-1.5-26
  file /usr/kerberos/man/man5/krb5.conf.5.gz from install of krb5-libs-1.6.1-17.el5 conflicts with file from package krb5-workstation-1.5-26
  file /usr/share/man/man1/asn1parse.1ssl.gz from install of openssl-0.9.8b-8.3.el5_0.2 conflicts with file from package openssl-0.9.8b-8.3.el5
  file /usr/share/man/man1/nseq.1ssl.gz from install of openssl-0.9.8b-8.3.el5_0.2 conflicts with file from package openssl-0.9.8b-8.3.el5
  file /usr/share/man/man1/ocsp.1ssl.gz from install of openssl-0.9.8b-8.3.el5_0.2 conflicts with file from package openssl-0.9.8b-8.3.el5
  file /usr/share/man/man1/smime.1ssl.gz from install of openssl-0.9.8b-8.3.el5_0.2 conflicts with file from package openssl-0.9.8b-8.3.el5
  file /usr/share/man/man5/namespace.conf.5.gz from install of pam-0.99.6.2-3.26.el5 conflicts with file from package pam-0.99.6.2-3.14.el5
  file /usr/share/man/man8/pam_access.8.gz from install of pam-0.99.6.2-3.26.el5 conflicts with file from package pam-0.99.6.2-3.14.el5
  file /usr/share/man/man8/pam_limits.8.gz from install of pam-0.99.6.2-3.26.el5 conflicts with file from package pam-0.99.6.2-3.14.el5
  file /usr/share/man/man8/pam_namespace.8.gz from install of pam-0.99.6.2-3.26.el5 conflicts with file from package pam-0.99.6.2-3.14.el5
  file /usr/share/man/man8/pam_selinux.8.gz from install of pam-0.99.6.2-3.26.el5 conflicts with file from package pam-0.99.6.2-3.14.el5
  file /usr/share/man/man8/pam_succeed_if.8.gz from install of pam-0.99.6.2-3.26.el5 conflicts with file from package pam-0.99.6.2-3.14.el5
  file /usr/share/man/man8/pam_time.8.gz from install of pam-0.99.6.2-3.26.el5 conflicts with file from package pam-0.99.6.2-3.14.el5
  file /usr/share/man/man8/avcstat.8.gz from install of libselinux-1.33.4-4.el5 conflicts with file from package libselinux-1.33.4-2.el5
  file /usr/share/man/man8/getenforce.8.gz from install of libselinux-1.33.4-4.el5 conflicts with file from package libselinux-1.33.4-2.el5
  file /usr/share/man/man8/getsebool.8.gz from install of libselinux-1.33.4-4.el5 conflicts with file from package libselinux-1.33.4-2.el5
  file /usr/share/man/man8/matchpathcon.8.gz from install of libselinux-1.33.4-4.el5 conflicts with file from package libselinux-1.33.4-2.el5
  file /usr/share/man/man8/selinuxenabled.8.gz from install of libselinux-1.33.4-4.el5 conflicts with file from package libselinux-1.33.4-2.el5
  file /usr/share/man/man8/setenforce.8.gz from install of libselinux-1.33.4-4.el5 conflicts with file from package libselinux-1.33.4-2.el5
  file /usr/share/man/man8/togglesebool.8.gz from install of libselinux-1.33.4-4.el5 conflicts with file from package libselinux-1.33.4-2.el5

I had come across an error like this another time, but there were too many packages to have to try that particular solution out on (which is to erase the conflicting packages), and some of them look fairly vital to the system’s health so I didn’t want to start erasing important packages.

Instead I wondered if perhaps doing an update would help to solve the probelm:

$ yum update

After some time, downloading files etc, I got the following error message. This was a little more promising than the original error message as it was only one package causing the issue this time, and not such a vital one:

Transaction Check Error:
  file /usr/share/emacs/site-lisp/psvn.el from install of subversion-1.4.6-0.1.el5.rf conflicts with file from package subversion-1.4.2-2.el5
  file /usr/share/xemacs/site-packages/lisp/psvn.el from install of subversion-1.4.6-0.1.el5.rf conflicts with file from package subversion-1.4.2-2.el5

I tried erasing the file using rpm, but got this error message:

$ rpm -e subversion
error: "subversion" specifies multiple packages

So I used "yum erase" to get rid of it instead:

$ yum erase subversion
Loading "installonlyn" plugin
Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package subversion.x86_64 0:1.4.2-2.el5 set to be erased
---> Package subversion.i386 0:1.4.2-2.el5 set to be erased
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Removing:
 subversion              x86_64     1.4.2-2.el5      installed         7.9 M
 subversion              i386       1.4.2-2.el5      installed         7.6 M

Transaction Summary
=============================================================================
Install      0 Package(s)
Update       0 Package(s)
Remove       2 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Removing  : subversion                   ######################### [1/2]
  Removing  : subversion                   ######################### [2/2]

Removed: subversion.x86_64 0:1.4.2-2.el5 subversion.i386 0:1.4.2-2.el5
Complete!

After that, runnning "yum-update" worked fine. I then repeated the "yum install" command at the top of this post and it worked without any errors this time as well.