Como instalar o git para o CentOS?

7

Eu tentei várias sugestões de esta resposta mas nenhum deles funcionou.

[root@308321 sugar-dev]# yum install git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.ubiquityservers.com
 * epel: www.gtlib.gatech.edu
 * extras: mirrors.usinternet.com
 * updates: mirrors.serveraxis.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: perl-Git = 1.8.2.1-1.el5 for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Git) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Error) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libssl.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libexpat.so.0()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libcrypto.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Running transaction check
---> Package compat-expat1.x86_64 0:1.95.8-8.el6 will be installed
---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64
---> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed
---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed
---> Package perl-Git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Git-1.8.2.1-1.el5.x86_64
---> Package perl-TermReadKey.x86_64 0:2.30-13.el6 will be installed
--> Finished Dependency Resolution
Error: Package: perl-Git-1.8.2.1-1.el5.x86_64 (epel)
           Requires: perl(:MODULE_COMPAT_5.8.8)
Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)
           Requires: libcurl.so.3()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@308321 sugar-dev]# yum -y install git --disablerepo=updates
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.ubiquityservers.com
 * epel: www.gtlib.gatech.edu
 * extras: mirrors.usinternet.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: perl-Git = 1.8.2.1-1.el5 for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Git) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Error) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libssl.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libexpat.so.0()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libcrypto.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Running transaction check
---> Package compat-expat1.x86_64 0:1.95.8-8.el6 will be installed
---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64
---> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed
---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed
---> Package perl-Git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Git-1.8.2.1-1.el5.x86_64
---> Package perl-TermReadKey.x86_64 0:2.30-13.el6 will be installed
--> Finished Dependency Resolution
Error: Package: perl-Git-1.8.2.1-1.el5.x86_64 (epel)
           Requires: perl(:MODULE_COMPAT_5.8.8)
Error: Package: git-1.8.2.1-1.el5.x86_64 (epel)
           Requires: libcurl.so.3()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@308321 sugar-dev]# yum install git --disableexcludes=main --skip-broken
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.ubiquityservers.com
 * epel: www.gtlib.gatech.edu
 * extras: mirrors.usinternet.com
 * updates: mirrors.serveraxis.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: perl-Git = 1.8.2.1-1.el5 for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Git) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: perl(Error) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libssl.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libexpat.so.0()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Processing Dependency: libcrypto.so.6()(64bit) for package: git-1.8.2.1-1.el5.x86_64
--> Running transaction check
---> Package compat-expat1.x86_64 0:1.95.8-8.el6 will be installed
---> Package git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: libcurl.so.3()(64bit) for package: git-1.8.2.1-1.el5.x86_64
---> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed
---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed
---> Package perl-Git.x86_64 0:1.8.2.1-1.el5 will be installed
--> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-Git-1.8.2.1-1.el5.x86_64
---> Package perl-TermReadKey.x86_64 0:2.30-13.el6 will be installed
--> Finished Dependency Resolution

Packages skipped because of dependency problems:
    compat-expat1-1.95.8-8.el6.x86_64 from base
    git-1.8.2.1-1.el5.x86_64 from epel
    openssl098e-0.9.8e-17.el6.centos.2.x86_64 from base
    1:perl-Error-0.17015-4.el6.noarch from base
    perl-Git-1.8.2.1-1.el5.x86_64 from epel
    perl-TermReadKey-2.30-13.el6.x86_64 from base
[root@308321 sugar-dev]# git
-bash: git: command not found
[root@308321 sugar-dev]#


[root@308321 sugar-dev]# uname -a
Linux 308321.oliveyou.net 2.6.32-220.2.1.el6.x86_64 #1 SMP Fri Dec 23 02:21:33 CST 2011 x86_64 x86_64 x86_64 GNU/Linux
    
por Chloe 20.09.2013 / 06:26

2 respostas

20

Seu problema não é muito poucas versões de git disponíveis, mas são demais; git está no conjunto de recompensas de base / atualizações, mas uma versão mais recente também está em epel e está pisando nos pés uma da outra. Você também parece ter uma versão antiga do epo repo conectada (está pegando .el5 packages), e definitivamente não estará ajudando.

Tente

yum install git --disablerepo=epel

que você deve obter 1.7.1. Se isso funcionar, talvez você também queira consertar seu repositório epel (está em /etc/yum.repos.d/epel.repo ) e analisar a priorização do repositório, o que ajuda a impedir que novas versões de ferramentas (geralmente de repositórios complementares) pise em versões mais antigas repos), a menos que você peça especificamente que eles o façam.

    
por 20.09.2013 / 09:04
5

Você também deve verificar o artigo wiki do CentOS em repositórios

link

onde você encontrará algumas informações sobre a duplicação de conteúdo.

Você também pode experimentar os plug-ins do Yum: Prioridades ou ProtectBase .

Eles devem ajudar no gerenciamento de fontes de pacotes de terceiros.

    
por 20.09.2013 / 09:30

Tags