我想在我的debian 9(拉伸)计算机上安装git,当我键入:
sudo apt install git-all我收到这样的信息:
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 followi`ng information may help to resolve the situation:
The following packages have unmet dependencies:
git-all : Depends: git (> 1:2.25.0) but it is not going to be installed
Depends: git (< 1:2.25.0-.) but it is not going to be installed
Depends: git-el but it is not going to be installed
Depends: git-cvs but it is not going to be installed
Depends: git-mediawiki but it is not going to be installed
Depends: git-svn but it is not going to be installed
Depends: git-email but it is not going to be installed
Depends: git-gui but it is not going to be installed
Depends: gitk but it is not going to be installed
Depends: gitweb but it is not going to be installed
Recommends: git-daemon-run but it is not going to be installed or
git-daemon-sysvinit but it is not going to be installed
E: Unable to correct problems, you have held broken packages有什么需要帮忙的吗?谢谢
当我打字时什么都不会发生:
sudo dpkg --configure -a这个命令的结果是:
sudo apt update && sudo apt upgrade这是否意味着:
Hit:1 http://security.debian.org stretch/updates InRelease
Ign:2 http://deb.debian.org/debian stretch InRelease
Ign:3 http://httpredir.debian.org/debian stretch InRelease
Hit:4 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease
Hit:5 http://deb.debian.org/debian stretch-updates InRelease
Ign:6 http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 InRelease
Hit:7 http://httpredir.debian.org/debian stretch Release
Hit:8 http://repository.spotify.com stable InRelease
Hit:9 http://deb.debian.org/debian stretch Release
Hit:12 http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 Release
Hit:13 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Hit:16 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
Get:17 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
Get:18 https://deb.nodesource.com/node_9.x stretch InRelease [4,623 B]
Hit:19 http://ppa.launchpad.net/webupd8team/java/ubuntu cosmic InRelease
Hit:20 https://repo.skype.com/deb stable InRelease
Ign:10 https://get.docker.com/ubuntu docker InRelease
Get:21 https://get.docker.com/ubuntu docker Release [1,525 B]
Get:22 https://get.docker.com/ubuntu docker Release.gpg [473 B]
Ign:22 https://get.docker.com/ubuntu docker Release.gpg
Reading package lists... Done
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: GPG error: https://get.docker.com/ubuntu docker Release: The following signatures were invalid: 36A1D7869245C8950F966E92D8576A8BA88D21E9
E: The repository 'http://get.docker.io/ubuntu docker Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:18 and /etc/apt/sources.list.d/base.list:1发布于 2020-02-05 05:22:00
问题是:
http://ppa.launchpad.net/git-core/ppa/ubuntu focal你不能在Debian 9上使用Ubuntu焦点PPA。从你的配置中删除它,你就可以安装git了。
你可能也不需要git-all,
sudo apt install git应该就够了。
https://unix.stackexchange.com/questions/565835
复制相似问题