Ubuntu 22.04 LTS에 git을 설치했지만 최근에 어떤 이유로 제거되었습니다. git --version
보여주다 Command 'git' not found, but can be installed with: sudo apt install git
.
다시 설치하려고 하면 다음 오류가 발생합니다.
The following packages have unmet dependencies:
git : Depends: git-man (< 1:2.39.1-.) but 1:2.39.2-0ppa1~ubuntu22.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
나는 달려가서 sudo apt update
sudo apt upgrade
방해가 되는 것이 없는지 확인했습니다. sudo apt install -f
직업도 없습니다.
편집: apt policy
표시:
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://packages.microsoft.com/repos/code stable/main armhf Packages
release o=code stable,a=stable,n=stable,l=code stable,c=main,b=armhf
origin packages.microsoft.com
500 http://packages.microsoft.com/repos/code stable/main arm64 Packages
release o=code stable,a=stable,n=stable,l=code stable,c=main,b=arm64
origin packages.microsoft.com
500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
release o=code stable,a=stable,n=stable,l=code stable,c=main,b=amd64
origin packages.microsoft.com
500 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages
release v=1.0,o=Google LLC,a=stable,n=stable,l=Google,c=main,b=amd64
origin dl.google.com
500 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy/main i386 Packages
release v=22.04,o=LP-PPA-git-core,a=jammy,n=jammy,l=Git stable releases,c=main,b=i386
origin ppa.launchpadcontent.net
500 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy/main amd64 Packages
release v=22.04,o=LP-PPA-git-core,a=jammy,n=jammy,l=Git stable releases,c=main,b=amd64
origin ppa.launchpadcontent.net
500 http://security.ubuntu.com/ubuntu jammy-security/multiverse i386 Packages
release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=multiverse,b=i386
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages
release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=multiverse,b=amd64
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Packages
release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=universe,b=i386
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages
release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=universe,b=amd64
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu jammy-security/restricted i386 Packages
release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=restricted,b=i386
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages
release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=restricted,b=amd64
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages
release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=main,b=i386
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=main,b=amd64
origin security.ubuntu.com
100 http://us.archive.ubuntu.com/ubuntu jammy-backports/universe i386 Packages
release v=22.04,o=Ubuntu,a=jammy-backports,n=jammy,l=Ubuntu,c=universe,b=i386
origin us.archive.ubuntu.com
100 http://us.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages
release v=22.04,o=Ubuntu,a=jammy-backports,n=jammy,l=Ubuntu,c=universe,b=amd64
origin us.archive.ubuntu.com
100 http://us.archive.ubuntu.com/ubuntu jammy-backports/main i386 Packages
release v=22.04,o=Ubuntu,a=jammy-backports,n=jammy,l=Ubuntu,c=main,b=i386
origin us.archive.ubuntu.com
100 http://us.archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages
release v=22.04,o=Ubuntu,a=jammy-backports,n=jammy,l=Ubuntu,c=main,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy-updates/multiverse i386 Packages
release v=22.04,o=Ubuntu,a=jammy-updates,n=jammy,l=Ubuntu,c=multiverse,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages
release v=22.04,o=Ubuntu,a=jammy-updates,n=jammy,l=Ubuntu,c=multiverse,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages
release v=22.04,o=Ubuntu,a=jammy-updates,n=jammy,l=Ubuntu,c=universe,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
release v=22.04,o=Ubuntu,a=jammy-updates,n=jammy,l=Ubuntu,c=universe,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy-updates/restricted i386 Packages
release v=22.04,o=Ubuntu,a=jammy-updates,n=jammy,l=Ubuntu,c=restricted,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages
release v=22.04,o=Ubuntu,a=jammy-updates,n=jammy,l=Ubuntu,c=restricted,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages
release v=22.04,o=Ubuntu,a=jammy-updates,n=jammy,l=Ubuntu,c=main,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
release v=22.04,o=Ubuntu,a=jammy-updates,n=jammy,l=Ubuntu,c=main,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy/multiverse i386 Packages
release v=22.04,o=Ubuntu,a=jammy,n=jammy,l=Ubuntu,c=multiverse,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages
release v=22.04,o=Ubuntu,a=jammy,n=jammy,l=Ubuntu,c=multiverse,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy/universe i386 Packages
release v=22.04,o=Ubuntu,a=jammy,n=jammy,l=Ubuntu,c=universe,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
release v=22.04,o=Ubuntu,a=jammy,n=jammy,l=Ubuntu,c=universe,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy/restricted i386 Packages
release v=22.04,o=Ubuntu,a=jammy,n=jammy,l=Ubuntu,c=restricted,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages
release v=22.04,o=Ubuntu,a=jammy,n=jammy,l=Ubuntu,c=restricted,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy/main i386 Packages
release v=22.04,o=Ubuntu,a=jammy,n=jammy,l=Ubuntu,c=main,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
release v=22.04,o=Ubuntu,a=jammy,n=jammy,l=Ubuntu,c=main,b=amd64
origin us.archive.ubuntu.com
Pinned packages:
편집 2: 소프트웨어 및 업데이트를 통해 기존 PPA 제거가 작동했습니다.https://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependent-after-adding-a-ppa
답변1
나는 같은 문제를 가지고있다. 어느 시점에 ppa:git-core/ppa를 추가하고 잊어버렸습니다. 이는 귀하의 적절한 정책에도 있습니다.
apt policy |grep git
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
500 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy/main i386 Packages
release v=22.04,o=LP-PPA-git-core,a=jammy,n=jammy,l=Git stable releases,c=main,b=i386apt policy |grep git
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
500 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy/main i386 Packages
release v=22.04,o=LP-PPA-git-core,a=jammy,n=jammy,l=Git stable releases,c=main,b=i386
내가 찾은 가장 간단한 해결책은PPA 제거관리자가 문제를 해결할 때까지.
sudo apt install ppa-purge
sudo ppa-purge ppa:git-core/ppa
sudo apt update
sudo apt install git
그러나 약간 오래된 버전의 git이 남았습니다. 종속성을 해결하는 방법을 찾은 사람이 있으면 공유해 주세요. 패키지 관리자가 이 작업을 곧 수행할 수 있기를 바랍니다 :)