
Ich versuche, Git auf Ubuntu 14.04 (Trusty Tahr) zu installieren ... Als ich eintippte
sudo apt-get install git-all
es sagte:
E: Unable to locate package git
Also bin ich gelaufen:
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.
Wie kann ich das Problem beheben und was kann ich tun, damit es funktioniert?
Antwort1
Wie Sie aus dem Folgenden sehen können, git-all
existiert das Paket definitiv am 14.04 undnichterfordern einen 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:~$
Es befindet sich im Abschnitt „Universe“ der Ubuntu-Repositories. Stellen Sie daher sicher, dass Sie es aktiviert haben, indem Sie der Spur folgen:
Dash --> Software & Updates --> Ubuntu Software --> Community maintained....
Sehen Sie sich diesen Screenshot an, in dem der Mauszeiger auf das entsprechende Repository zeigt:
Nachdem Sie „Universe“ aktiviert und das Neuladen des Repository-Index zugelassen haben, entfernen Sie das PPA und führen Sie dann einfach Folgendes aus:
sudo apt-get install git-all
Und alles sollte gut sein …