同じ名前の別の質問とは異なり、私はDebianを使用していますが、同じエラーのためにどのパッケージも機能しないため、どのパッケージもインストールできませんE: Package '<package name>' has no installation candidate
。 aptはまだリポジトリを一覧表示できます。 source.listを修正しようとした後、更新、アップグレード、再起動、および反復を実行しましたが、何も機能しませんでした。
例えば、
$ sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package nodejs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'nodejs' has no installation candidate
実行すると、$ find /etc/apt/ -path *.list | xargs cat
次のものが生成されます。
#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#
###### Debian Main Repos
deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free
###### Debian Update Repos
deb http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-proposed-updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie-proposed-updates main contrib non-free
deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://archive.raspberrypi.org/debian/ jessie main ui
deb https://dev2day.de/pms/ jessie main
deb http://dl.bintray.com/openhab/apt-repo stable main
ベストアンサー1
いくつかの確率があります:
- リストを更新できません。また、すべてのリポジトリがリストされていることを
apt-get update
確認する必要があります。apt-cache policy
追加したリポジトリソースやその他のコンポーネントでパッケージを使用できない場合があります。 Debian の場合は、次を使用します。マディソン、他のディストリビューションでも同等のバージョンを使用できます。たとえば、このパッケージには次のものが必要です。
nodejs | 0.10.29~dfsg-1~bpo70+1 | wheezy-backports | source, amd64, armel, armhf, i386, kfreebsd-amd64, kfreebsd-i386 nodejs | 0.10.29~dfsg-2 | stable | source, amd64, armel, armhf, i386, mipsel nodejs | 0.10.29~dfsg-2 | stable-kfreebsd | source, kfreebsd-amd64, kfreebsd-i386 nodejs | 4.3.1~dfsg-3 | testing | source, amd64, arm64, armel, armhf, i386, mips, mipsel, powerpc, ppc64el, s390x nodejs | 4.4.7~dfsg-2 | unstable | source, amd64, arm64, armhf, i386, kfreebsd-amd64, kfreebsd-i386, mips, mips64el, mipsel, powerpc, ppc64el, s390x nodejs | 5.11.0~dfsg-1 | experimental | source, mipsel nodejs | 6.0.0~dfsg-1 | experimental | source, amd64, arm64, armel, armhf, i386, kfreebsd-amd64, kfreebsd-i386, mips, mips64el, powerpc, ppc64el, s390x
これらのリポジトリは、アクティブでないコンポーネントまたはまだ追加されていないコンポーネント(たとえば、main、contrib、non-free)にあります。
- パッケージがアーキテクチャに適していない可能性があります。
dpkg --print-architecture
使用しているアーキテクチャを理解し、それをMadison出力と比較するのに役立ちます。
これらのいずれかが失敗した場合は、このメッセージを受け取ります。apt-cache policy package
パッケージがローカルパッケージのリストにあることを確認してください。