E: 패키지''설치후보자 없음

E: 패키지''설치후보자 없음

비슷한 이름을 가진 다른 질문과 달리 저는 데비안을 사용하고 있는데 같은 오류로 인해 어떤 패키지도 작동하지 않기 때문에 어떤 패키지도 설치할 수 없습니다 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
  • 추가한 리포지토리 소스나 기타 구성 요소에서 패키지를 사용하지 못할 수도 있습니다. 데비안의 경우 다음을 사용하십시오.매디슨, 다른 배포판에서도 동등한 버전을 사용할 수 있습니다. 예를 들어 이 패키지에는 다음이 필요합니다.

    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패키지가 로컬 패키지 목록에 있는지 확인 하십시오 .

답변2

배포판의 공식 웹사이트에서 패키지 저장소를 확인하고 이러한 링크를 /etc/apt/source.list 파일에 추가하면 제대로 작동합니다.

답변3

문제가 특정 리포지토리와 관련된 경우 적절한 구성을 확인해보세요: /etc/apt/preferences.d/

이러한 특정 패키지의 업그레이드를 허용하지 않는 고정된 파일이 있을 수 있습니다.

패키지 버전 변경으로 인해 문제가 발생할 수 있는 경우 Docker 이미지에서 이런 일이 발생할 수 있습니다.

이게 도움이 되길 바란다.

관련 정보