
Estou tentando instalar o Git no Ubuntu 14.04 (Trusty Tahr)... Quando digitei
sudo apt-get install git-all
disse:
E: Unable to locate package git
Então eu corri:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E1DD270288B4E6030699E45FA1715D88E1DF1F24
sudo su -c "echo 'deb http://ppa.launchpad.net/git-core/ppa/ubuntu trusty main' > /etc/apt/sources.list.d/git.list"
sudo apt-get update
sudo apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
git : Depends: liberror-perl but it is not installable
Recommends: patch but it is not installable
Recommends: rsync but it is not installable
Recommends: ssh-client but it is not installable
E: Unable to correct problems, you have held broken packages.
Como posso consertar isso e o que posso fazer para que funcione?
Responder1
Como você pode ver a seguir, o git-all
pacote certamente existe em 14.04 e nãonãoexigir um PPA:
andrew@corinth:~$ apt-cache policy git-all
git-all:
Installed: (none)
Candidate: 1:1.9.1-1ubuntu0.3
Version table:
1:1.9.1-1ubuntu0.3 0
500 http://au.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 Packages
1:1.9.1-1 0
500 http://au.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
andrew@corinth:~$
Ele está na seção 'Universo' dos Repositórios do Ubuntu, então certifique-se de ativá-lo seguindo a trilha:
Dash --> Software & Updates --> Ubuntu Software --> Community maintained....
Veja esta captura de tela onde o cursor do mouse indica o Repositório apropriado:
Depois de ativar o 'Universo' e permitir que o índice do Repositório seja recarregado, livre-se do PPA e simplesmente execute:
sudo apt-get install git-all
E tudo deve ficar bem...