apt-get: 거의 모든 패키지에 대해 "설치 후보 없음"

apt-get: 거의 모든 패키지에 대해 "설치 후보 없음"

노트:이 질문이 중복된 것 같아요"E: 패키지 ''에는 설치 후보가 없습니다.", 하지만 이 질문에 유일하게 게시된 답변은 나에게 전혀 도움이 되지 않았습니다. 나는 댓글과 답변에 있는 각 제안의 결과를 포함하여 질문보다 더 많은 정보를 포함하려고 노력했습니다.


배경:저는 Raspbian Wheezy를 실행하는 Raspberry Pi 1 Model B를 가지고 있는데, 이전에 ROS(로봇 운영 체제)를 설치했지만 다른 작업은 별로 하지 않았습니다. 이번 주에는 소스에서 몇 가지 추가 ROS 패키지를 설치하려고 했습니다. 다양한 컴파일러 및 종속성 문제를 해결하려고 시도하는 동안(인정합니다. 인터넷에서 임의의 명령을 실행하는 데 문제가 있었습니다. 문제는 libboost를 업그레이드한 다음 이전 버전으로 되돌리려고 시도한 후에 시작되었습니다.) 분명히 성공했습니다. apt-get시스템을 완전히 플러시합니다 .

내 문제는 apt-get더 이상 아무 것도 성공적으로 설치할 수 없다는 것입니다. 내가 시도한 모든 것은 "E: 패키지 '패키지 이름'에 설치 후보가 없습니다." 오류로 끝납니다(예, sudo apt-get update이 오류를 계속해서 반복해서 실행했습니다.source.list의 여러 변형). 및 에 따르면 apt-get upgrade모든 것이 최신 상태입니다 apt-get dist-upgrade. aptitude물건을 설치하는 데 더 이상 도움이 되지 않습니다.

기존 설치를 복구하고 싶지만 많은 작업 없이 시스템을 복구할 수 없는 경우 새 이미지에서 재부팅할 의향이 있습니다. 중요한 모든 것을 백업해 두었습니다.


다음은 /etc/apt/ 디렉터리에 있는 모든 .list 파일의 내용입니다.

pi@raspberrypi ~ $ find /etc/apt/ -path *.list | xargs tail -n +1
==> /etc/apt/sources.list.d/collabora.list <==
deb http://raspberrypi.collabora.com wheezy rpi

==> /etc/apt/sources.list.d/ros-latest.list <==
deb http://packages.ros.org/ros/ubuntu wheezy main

==> /etc/apt/sources.list.d/raspi.list <==
deb http://archive.raspberrypi.org/debian/ wheezy main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ wheezy main

==> /etc/apt/sources.list <==
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi

#deb http://raspbian.mirrors.lucidnetworks.net/raspbian/ wheezy main contrib non-free rpi

#deb http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
# Source repository to add
#deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
#deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
#deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
# Source repository to add
#deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi

apt-get updateapt-get upgrade다음은 , 및 의 출력 입니다 apt-get upgrade.

pi@raspberrypi ~ $ sudo apt-get update
Hit http://packages.ros.org wheezy Release.gpg
Hit http://raspberrypi.collabora.com wheezy Release.gpg
Hit http://archive.raspberrypi.org wheezy Release.gpg
Hit http://packages.ros.org wheezy Release
Hit http://raspberrypi.collabora.com wheezy Release
Hit http://archive.raspberrypi.org wheezy Release
Hit http://mirrordirector.raspbian.org wheezy Release.gpg
Hit http://mirrordirector.raspbian.org testing Release.gpg
Hit http://packages.ros.org wheezy/main armhf Packages
Hit http://mirrordirector.raspbian.org wheezy Release
Hit http://raspberrypi.collabora.com wheezy/rpi armhf Packages
Hit http://mirrordirector.raspbian.org testing Release
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/main armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/contrib armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/non-free armhf Packages
Ign http://packages.ros.org wheezy/main Translation-en_GB
Ign http://packages.ros.org wheezy/main Translation-en
Hit http://mirrordirector.raspbian.org wheezy/rpi armhf Packages
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en_GB
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Hit http://mirrordirector.raspbian.org testing/main Sources
Hit http://mirrordirector.raspbian.org testing/contrib Sources
Hit http://mirrordirector.raspbian.org testing/non-free Sources
Hit http://mirrordirector.raspbian.org testing/rpi Sources
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Reading package lists... Done

pi@raspberrypi ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

pi@raspberrypi ~ $ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

훌륭하고 간단한 프로그램인 bc를 설치하려고 하면 다음과 같은 일이 발생합니다.

pi@raspberrypi ~ $ sudo apt-get install bc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package bc 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 'bc' has no installation candidate

마지막으로 관련성이 있을 수 있는 몇 가지 apt-cache 결과는 다음과 같습니다. install-info의 (최소 요구 사항?) "(null)" 버전 번호가 정상적인지는 확실하지 않지만 모든 종속성을 설치했습니다.

pi@raspberrypi ~ $ dpkg --print-architecture
armhf

pi@raspberrypi ~ $ apt-cache dump | grep -m 1 -A 9 'Package: bc$'
Package: bc
 Version: 1.06.95-2
     File: /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages
  Depends: libc6 2.4
  Depends: libreadline6 6.0
  Depends: dpkg 1.15.4
  Depends: install-info (null)
 Description Language:
                 File: /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages
                  MD5: 5d0bd9bd305e8d8ca79ea90107c2ec5a

pi@raspberrypi ~ $ apt-cache policy bc
bc:
  Installed: (none)
  Candidate: (none)
  Version table:
     1.06.95-2 0
        -10 http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages

pi@raspberrypi ~ $ apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://packages.ros.org/ros/ubuntu/ wheezy/main armhf Packages
     release o=ROS,a=wheezy,n=wheezy,l=ROS wheezy,c=main
     origin packages.ros.org
 500 http://archive.raspberrypi.org/debian/ wheezy/main armhf Packages
     release o=Raspberry Pi Foundation,a=oldstable,n=wheezy,l=Raspberry Pi Foundation,c=main
     origin archive.raspberrypi.org
 500 http://raspberrypi.collabora.com/ wheezy/rpi armhf Packages
     release o=Collabora,n=wheezy,l=Collabora Raspberry Pi graphics enablement,c=rpi
     origin raspberrypi.collabora.com
 -10 http://mirrordirector.raspbian.org/raspbian/ wheezy/rpi armhf Packages
     release v=7.0,o=Raspbian,a=oldstable,n=wheezy,l=Raspbian,c=rpi
     origin mirrordirector.raspbian.org
 -10 http://mirrordirector.raspbian.org/raspbian/ wheezy/non-free armhf Packages
     release v=7.0,o=Raspbian,a=oldstable,n=wheezy,l=Raspbian,c=non-free
     origin mirrordirector.raspbian.org
 -10 http://mirrordirector.raspbian.org/raspbian/ wheezy/contrib armhf Packages
     release v=7.0,o=Raspbian,a=oldstable,n=wheezy,l=Raspbian,c=contrib
     origin mirrordirector.raspbian.org
 -10 http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages
     release v=7.0,o=Raspbian,a=oldstable,n=wheezy,l=Raspbian,c=main
     origin mirrordirector.raspbian.org
Pinned packages:

pi@raspberrypi ~ $ apt-cache showpkg bc
Package: bc
Versions:
1.06.95-2 (/var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages)
 Description Language:
                 File: /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_main_binary-armhf_Packages
                  MD5: 5d0bd9bd305e8d8ca79ea90107c2ec5a


Reverse Depends:
  simbamond,bc
  videogen,bc
  shorewall-lite,bc
  shorewall-core,bc
  shorewall,bc
  secvpn,bc
  lsb-core,bc
  linux-source-3.18,bc
  linux-source-3.12,bc
  linux-source-3.10,bc
  junior-math,bc
  ibid,bc
  fish,bc
  education-common,bc
  debian-cd,bc
  cups,bc
  calamaris,bc
  apt-move,bc
Dependencies:
1.06.95-2 - libc6 (2 2.4) libreadline6 (2 6.0) dpkg (18 1.15.4) install-info (0 (null))
Provides:
1.06.95-2 -
Reverse Provides:

pi@raspberrypi ~ $ apt-cache madison bc
        bc |  1.06.95-2 | http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages
        bc |  1.06.95-9 | http://mirrordirector.raspbian.org/raspbian/ testing/main Sources

디스크 공간이 부족하지 않았습니다.

pi@raspberrypi ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        59G  6.1G   50G  11% /
devtmpfs        214M     0  214M   0% /dev
tmpfs            44M  252K   44M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            87M     0   87M   0% /run/shm
/dev/mmcblk0p1   56M   20M   36M  36% /boot

편집하다:Giles의 의견에 대한 응답으로 다음은 내 의견입니다 /etc/apt/preferences.

pi@raspberrypi ~ $ ls /etc/apt/preferences.d
pi@raspberrypi ~ $ cat /etc/apt/preferences
Package: *
Pin: release n=wheezy
Pin-Priority: 900
Package: *
Pin: release n=jessie
Pin-Priority: 300
Package: *
Pin: release o=Raspbian
Pin-Priority: -10

관련 정보