During an attempt to update Git on a CentOS Linux server via the Yum Package manager this evening I ran into a dependency error. The newer Git package has a dependency of Git-CVS package which also has a dependency of CVSPS package. So initially when I installed Git it didn’t require these packages so I never ran into an error. Below I show the error displayed when attempting to upgrade git via yum followed by how I resolved the issue installing the EPEL repository.
Error Upgrading Git Via The Yum Package Manager On CentOS Linux:
- [root@cent1 ~]# yum update git
- Loaded plugins: dellsysid, fastestmirror
- Loading mirror speeds from cached hostfile
- * addons: mirrors.gigenet.com
- * base: mirror.nexcess.net
- * extras: centos.mirrors.tds.net
- * rpmforge: apt.sw.be
- * updates: centos.mirrors.tds.net
- Setting up Update Process
- Resolving Dependencies
- --> Running transaction check
- --> Processing Dependency: git = 1.5.2.1-1.el5.rf for package: perl-Git
- ---> Package git-all.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Processing Dependency: gitk = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git-gui = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: emacs-git = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git-cvs = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git-arch = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git-email = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git-svn = 1.7.2.2-1.el5.rf for package: git-all
- --> Running transaction check
- ---> Package emacs-git.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Processing Dependency: emacs-common for package: emacs-git
- ---> Package git.i386 0:1.7.2.2-1.el5.rf set to be updated
- ---> Package git-arch.i386 0:1.7.2.2-1.el5.rf set to be updated
- ---> Package git-cvs.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Processing Dependency: cvsps for package: git-cvs
- ---> Package git-email.i386 0:1.7.2.2-1.el5.rf set to be updated
- ---> Package git-gui.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Processing Dependency: tk >= 8.4 for package: git-gui
- ---> Package git-svn.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Processing Dependency: perl(Term::ReadKey) for package: git-svn
- ---> Package gitk.i386 0:1.7.2.2-1.el5.rf set to be updated
- ---> Package perl-Git.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Running transaction check
- ---> Package emacs-common.i386 0:21.4-20.el5 set to be updated
- ---> Package git-cvs.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Processing Dependency: cvsps for package: git-cvs
- ---> Package perl-TermReadKey.i386 0:2.30-3.el5.rf set to be updated
- ---> Package tk.i386 0:8.4.13-5.el5_1.1 set to be updated
- --> Finished Dependency Resolution
- git-cvs-1.7.2.2-1.el5.rf.i386 from rpmforge has depsolving problems
- --> Missing Dependency: cvsps is needed by package git-cvs-1.7.2.2-1.el5.rf.i386 (rpmforge)
- Error: Missing Dependency: cvsps is needed by package git-cvs-1.7.2.2-1.el5.rf.i386 (rpmforge)
- 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
As you can see the error comes from the cvsps RPM package not being available in any of the installed Yum repositories. After some searching around I figured out that the csvps package is available via the EPEL Yum repository. You can follow the directions in this article to install the EPEL repository. After installing the EPEL repo the csvps package will be available and you will be able to successfully upgrade git without issue as shown in the below example.
**NOTE** If this is your first install of the EPEL repo then you will have to agree to importing the GPG key during the git update process as shown below. Simply click “y” followed by “enter” to install the GPG key and continue.
Upgrade Git Without Issue After EPEL Yum Repository Is Installed:
- [root@cent1 yum.repos.d]# yum update git
- Loaded plugins: dellsysid, fastestmirror
- Loading mirror speeds from cached hostfile
- * addons: mirrors.gigenet.com
- * base: mirror.nexcess.net
- * epel: mirror.steadfast.net
- * extras: centos.mirrors.tds.net
- * rpmforge: apt.sw.be
- * updates: centos.mirrors.tds.net
- Setting up Update Process
- Resolving Dependencies
- --> Running transaction check
- --> Processing Dependency: git = 1.5.2.1-1.el5.rf for package: perl-Git
- ---> Package git-all.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Processing Dependency: gitk = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git-gui = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: emacs-git = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git-cvs = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git-arch = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git-email = 1.7.2.2-1.el5.rf for package: git-all
- --> Processing Dependency: git-svn = 1.7.2.2-1.el5.rf for package: git-all
- --> Running transaction check
- ---> Package emacs-git.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Processing Dependency: emacs-common for package: emacs-git
- ---> Package git.i386 0:1.7.2.2-1.el5.rf set to be updated
- ---> Package git-arch.i386 0:1.7.2.2-1.el5.rf set to be updated
- ---> Package git-cvs.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Processing Dependency: cvsps for package: git-cvs
- ---> Package git-email.i386 0:1.7.2.2-1.el5.rf set to be updated
- ---> Package git-gui.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Processing Dependency: tk >= 8.4 for package: git-gui
- ---> Package git-svn.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Processing Dependency: perl(Term::ReadKey) for package: git-svn
- ---> Package gitk.i386 0:1.7.2.2-1.el5.rf set to be updated
- ---> Package perl-Git.i386 0:1.7.2.2-1.el5.rf set to be updated
- --> Running transaction check
- ---> Package cvsps.i386 0:2.1-7.el5 set to be updated
- ---> Package emacs-common.i386 0:21.4-20.el5 set to be updated
- ---> Package perl-TermReadKey.i386 0:2.30-4.el5 set to be updated
- ---> Package tk.i386 0:8.4.13-5.el5_1.1 set to be updated
- --> Finished Dependency Resolution
- Dependencies Resolved
- ====================================================================================================================================
- Package Arch Version Repository Size
- ====================================================================================================================================
- Installing:
- git-all i386 1.7.2.2-1.el5.rf rpmforge 2.8 k
- replacing git.i386 1.5.2.1-1.el5.rf
- Installing for dependencies:
- cvsps i386 2.1-7.el5 epel 56 k
- emacs-common i386 21.4-20.el5 base 11 M
- emacs-git i386 1.7.2.2-1.el5.rf rpmforge 45 k
- git-arch i386 1.7.2.2-1.el5.rf rpmforge 14 k
- git-cvs i386 1.7.2.2-1.el5.rf rpmforge 72 k
- git-email i386 1.7.2.2-1.el5.rf rpmforge 15 k
- git-gui i386 1.7.2.2-1.el5.rf rpmforge 236 k
- git-svn i386 1.7.2.2-1.el5.rf rpmforge 55 k
- gitk i386 1.7.2.2-1.el5.rf rpmforge 122 k
- perl-TermReadKey i386 2.30-4.el5 epel 32 k
- tk i386 8.4.13-5.el5_1.1 base 888 k
- Updating for dependencies:
- git i386 1.7.2.2-1.el5.rf rpmforge 6.1 M
- perl-Git i386 1.7.2.2-1.el5.rf rpmforge 24 k
- Transaction Summary
- ====================================================================================================================================
- Install 12 Package(s)
- Upgrade 2 Package(s)
- Total download size: 18 M
- Is this ok [y/N]: y
- Downloading Packages:
- (1/14): git-all-1.7.2.2-1.el5.rf.i386.rpm | 2.8 kB 00:00
- (2/14): git-arch-1.7.2.2-1.el5.rf.i386.rpm | 14 kB 00:00
- (3/14): git-email-1.7.2.2-1.el5.rf.i386.rpm | 15 kB 00:00
- (4/14): perl-Git-1.7.2.2-1.el5.rf.i386.rpm | 24 kB 00:00
- (5/14): perl-TermReadKey-2.30-4.el5.i386.rpm | 32 kB 00:00
- (6/14): emacs-git-1.7.2.2-1.el5.rf.i386.rpm | 45 kB 00:00
- (7/14): git-svn-1.7.2.2-1.el5.rf.i386.rpm | 55 kB 00:00
- (8/14): cvsps-2.1-7.el5.i386.rpm | 56 kB 00:00
- (9/14): git-cvs-1.7.2.2-1.el5.rf.i386.rpm | 72 kB 00:00
- (10/14): gitk-1.7.2.2-1.el5.rf.i386.rpm | 122 kB 00:00
- (11/14): git-gui-1.7.2.2-1.el5.rf.i386.rpm | 236 kB 00:00
- (12/14): tk-8.4.13-5.el5_1.1.i386.rpm | 888 kB 00:01
- (13/14): git-1.7.2.2-1.el5.rf.i386.rpm | 6.1 MB 00:06
- (14/14): emacs-common-21.4-20.el5.i386.rpm | 11 MB 00:07
- ------------------------------------------------------------------------------------------------------------------------------------
- Total 958 kB/s | 18 MB 00:19
- warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6
- epel/gpgkey | 1.7 kB 00:00
- Importing GPG key 0x217521F6 "Fedora EPEL <epel@fedoraproject.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 : tk 1/16
- Installing : emacs-common 2/16
- Installing : cvsps 3/16
- Installing : perl-TermReadKey 4/16
- Updating : git 5/16
- Updating : perl-Git 6/16
- Installing : gitk 7/16
- Installing : git-gui 8/16
- Installing : git-cvs 9/16
- Installing : git-email 10/16
- Installing : git-svn 11/16
- Installing : git-arch 12/16
- Installing : emacs-git 13/16
- Installing : git-all 14/16
- Cleanup : git 15/16
- Cleanup : perl-Git 16/16
- Installed:
- git-all.i386 0:1.7.2.2-1.el5.rf
- Dependency Installed:
- cvsps.i386 0:2.1-7.el5 emacs-common.i386 0:21.4-20.el5 emacs-git.i386 0:1.7.2.2-1.el5.rf
- git-arch.i386 0:1.7.2.2-1.el5.rf git-cvs.i386 0:1.7.2.2-1.el5.rf git-email.i386 0:1.7.2.2-1.el5.rf
- git-gui.i386 0:1.7.2.2-1.el5.rf git-svn.i386 0:1.7.2.2-1.el5.rf gitk.i386 0:1.7.2.2-1.el5.rf
- perl-TermReadKey.i386 0:2.30-4.el5 tk.i386 0:8.4.13-5.el5_1.1
- Dependency Updated:
- git.i386 0:1.7.2.2-1.el5.rf perl-Git.i386 0:1.7.2.2-1.el5.rf
- Replaced:
- git.i386 0:1.5.2.1-1.el5.rf
- Complete!
Now git is upgraded to the latest and greatest version available via my Yum repositories, which is git version 1.7.2.2, as shown in he below output.
Git Version 1.7.2.2 Displayed On CentOS Linux:
- [root@cent1 yum.repos.d]# git --version
- git version 1.7.2.2
Thats it your git is rocking. The EPEL has a lot of packages required by other packages as well.