首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在debian9上安装git (拉伸)

无法在debian9上安装git (拉伸)
EN

Unix & Linux用户
提问于 2020-02-05 03:03:41
回答 1查看 431关注 0票数 2

我想在我的debian 9(拉伸)计算机上安装git,当我键入:

代码语言:javascript
复制
sudo apt install git-all

我收到这样的信息:

代码语言:javascript
复制
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

有什么需要帮忙的吗?谢谢

编辑

当我打字时什么都不会发生:

代码语言:javascript
复制
sudo dpkg --configure -a

这个命令的结果是:

代码语言:javascript
复制
sudo apt update && sudo apt upgrade

这是否意味着:

代码语言:javascript
复制
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
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2020-02-05 05:22:00

问题是:

代码语言:javascript
复制
http://ppa.launchpad.net/git-core/ppa/ubuntu focal

你不能在Debian 9上使用Ubuntu焦点PPA。从你的配置中删除它,你就可以安装git了。

你可能也不需要git-all

代码语言:javascript
复制
sudo apt install git

应该就够了。

票数 5
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/565835

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档