Install Git on Centos
We sure would love it if git were installed on our server. So let’s do that!
[root@sunshine /var/cpanel/easy/apache/profile]# yum install git
Loaded plugins: fastestmirror, priorities, security Loading mirror speeds from cached hostfile stable-arch | 951 B 00:00 stable-generic | 951 B 00:00 stable-noarch | 951 B 00:00 system-base | 3.7 kB 00:00 system-extras | 3.4 kB 00:00 system-updates-released | 3.4 kB 00:00 3 packages excluded due to repository priority protections Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package git.x86_64 0:1.7.1-3.el6_4.1 will be installed --> Processing Dependency: perl-Git = 1.7.1-3.el6_4.1 for package: git-1.7.1-3.el6_4.1.x86_64 --> Processing Dependency: perl(Git) for package: git-1.7.1-3.el6_4.1.x86_64 --> Processing Dependency: perl(Error) for package: git-1.7.1-3.el6_4.1.x86_64 --> Finished Dependency Resolution Error: Package: git-1.7.1-3.el6_4.1.x86_64 (system-base) Requires: perl-Git = 1.7.1-3.el6_4.1 Error: Package: git-1.7.1-3.el6_4.1.x86_64 (system-base) Requires: perl(Error) Error: Package: git-1.7.1-3.el6_4.1.x86_64 (system-base) Requires: perl(Git) You could try using --skip-broken to work around the problem ** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows: frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0
Well now. That’s a problem.
So let’s google it.
Aha! So we found the following. Let’s try it out and see if things start to smoke or burst into flames…
[root@sunshine /var/cpanel/easy/apache/profile]# yum install git --disableexcludes=main
Loaded plugins: fastestmirror, priorities, security Loading mirror speeds from cached hostfile 3 packages excluded due to repository priority protections Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package git.x86_64 0:1.7.1-3.el6_4.1 will be installed --> Processing Dependency: perl-Git = 1.7.1-3.el6_4.1 for package: git-1.7.1-3.el6_4.1.x86_64 --> Processing Dependency: perl(Git) for package: git-1.7.1-3.el6_4.1.x86_64 --> Processing Dependency: perl(Error) for package: git-1.7.1-3.el6_4.1.x86_64 --> Running transaction check ---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed ---> Package perl-Git.noarch 0:1.7.1-3.el6_4.1 will be installed --> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================ Package Arch Version Repository Size ============================================================================================================================================ Installing: git x86_64 1.7.1-3.el6_4.1 system-base 4.6 M Installing for dependencies: perl-Error noarch 1:0.17015-4.el6 system-base 29 k perl-Git noarch 1.7.1-3.el6_4.1 system-base 28 k
Transaction Summary ============================================================================================================================================ Install 3 Package(s)
Total download size: 4.7 M Installed size: 15 M Is this ok [y/N]: y Downloading Packages: (1/3): git-1.7.1-3.el6_4.1.x86_64.rpm | 4.6 MB 00:00 (2/3): perl-Error-0.17015-4.el6.noarch.rpm | 29 kB 00:00 (3/3): perl-Git-1.7.1-3.el6_4.1.noarch.rpm | 28 kB 00:00 -------------------------------------------------------------------------------------------------------------------------------------------- Total 26 MB/s | 4.7 MB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : 1:perl-Error-0.17015-4.el6.noarch 1/3 Installing : perl-Git-1.7.1-3.el6_4.1.noarch 2/3 Installing : git-1.7.1-3.el6_4.1.x86_64 3/3 Verifying : git-1.7.1-3.el6_4.1.x86_64 1/3 Verifying : perl-Git-1.7.1-3.el6_4.1.noarch 2/3 Verifying : 1:perl-Error-0.17015-4.el6.noarch 3/3
Installed: git.x86_64 0:1.7.1-3.el6_4.1
Dependency Installed: perl-Error.noarch 1:0.17015-4.el6 perl-Git.noarch 0:1.7.1-3.el6_4.1
Complete!
Boomz.