cPanel runs on CentOS and installing git on CentOS is easy right? Wrong.
cPanel has to exclude a lot of the perl packages so they don’t mess with it’s mojo. So trying to install it looks like this:
[email protected] [~]# yum install git 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 (updates) Requires: perl-Git = 1.7.1-3.el6_4.1 Error: Package: git-1.7.1-3.el6_4.1.x86_64 (updates) Requires: perl(Error) Error: Package: git-1.7.1-3.el6_4.1.x86_64 (updates) 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
Fear it!
However the solution is simple – it’s already installed! (as of cPanel 11.36)
Just run:
/usr/local/cpanel/3rdparty/bin/git
if you want to add it to your path you can symlink it using something like this:
ln -s /usr/local/cpanel/3rdparty/bin/git /usr/bin/git
Too easy! Thanks for stopping by.