debian9にgitをインストールできません(ストレッチ)

debian9にgitをインストールできません(ストレッチ)

次のように入力すると、Debian 9(stretch)コンピュータに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

ベストアンサー1

問題はこれである:

http://ppa.launchpad.net/git-core/ppa/ubuntu focal

Debian 9 では Ubuntu Focus PPA は使用できません。設定からそれを削除すると、gitをインストールできます。

おそらくあなたには必要ありませんgit-all

sudo apt install git

それだけで十分です。

おすすめ記事