
Ubuntu 14.04(Trusty Tahr)에 Git을 설치하려고 하는데... 입력할 때
sudo apt-get install git-all
그것은 말했다:
E: Unable to locate package git
그래서 나는 다음을 실행했습니다.
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.
이 문제를 어떻게 고칠 수 있으며, 작동하게 하려면 어떻게 해야 합니까?
답변1
다음에서 볼 수 있듯이 git-all
패키지는 확실히 14.04에 존재하며~ 아니다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:~$
Ubuntu 리포지토리의 'Universe' 섹션에 있으므로 다음 트레일을 따라 활성화되었는지 확인하세요.
Dash --> Software & Updates --> Ubuntu Software --> Community maintained....
마우스 커서가 적절한 저장소를 나타내는 이 스크린샷을 참조하세요.
'Universe'를 활성화하고 리포지토리 인덱스를 다시 로드한 후 PPA를 제거하고 다음을 실행하세요.
sudo apt-get install git-all
그리고 모두 잘되야 할텐데...