我正在尝试在 RaspberryPi(可能是型号 3B)上安装几个实用程序,但我在apt-get
解析软件包版本的命令方面遇到问题。
具体来说,尝试安装时minicom
,我收到以下错误。它也与“telnet”和“putty”类似:
$ sudo apt-get install minicom
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
lrzsz
The following NEW packages will be installed:
lrzsz minicom
0 upgraded, 2 newly installed, 0 to remove and 317 not upgraded.
Need to get 332 kB of archives.
After this operation, 997 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
lrzsz minicom
Install these packages without verification? [y/N] y
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main lrzsz armhf 0.12.21-7
404 Not Found [IP: 93.93.128.193 80]
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main minicom armhf 2.7-1+deb8u1
404 Not Found [IP: 93.93.128.193 80]
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/l/lrzsz/lrzsz_0.12.21-7_armhf.deb 404 Not Found [IP: 93.93.128.193 80]
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/m/minicom/minicom_2.7-1+deb8u1_armhf.deb 404 Not Found [IP: 93.93.128.193 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
按照错误消息的建议,我尝试更新,但遇到类似的错误:
$ sudo apt-get update
Hit http://archive.raspberrypi.org jessie InRelease
Ign http://mirrordirector.raspbian.org jessie InRelease
Ign http://mirrordirector.raspbian.org jessie Release.gpg
Ign http://mirrordirector.raspbian.org jessie Release
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Err http://mirrordirector.raspbian.org jessie/main armhf Packages
404 Not Found [IP: 93.93.128.193 80]
Err http://mirrordirector.raspbian.org jessie/contrib armhf Packages
404 Not Found [IP: 93.93.128.193 80]
Err http://mirrordirector.raspbian.org jessie/non-free armhf Packages
404 Not Found [IP: 93.93.128.193 80]
Err http://mirrordirector.raspbian.org jessie/rpi armhf Packages
404 Not Found [IP: 93.93.128.193 80]
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/main/binary-armhf/Packages 404 Not Found [IP: 93.93.128.193 80]
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/contrib/binary-armhf/Packages 404 Not Found [IP: 93.93.128.193 80]
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/non-free/binary-armhf/Packages 404 Not Found [IP: 93.93.128.193 80]
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/rpi/binary-armhf/Packages 404 Not Found [IP: 93.93.128.193 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
... 并且:
$ sudo apt-get install minicom --fix-missing
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
lrzsz
The following NEW packages will be installed:
lrzsz minicom
0 upgraded, 2 newly installed, 0 to remove and 317 not upgraded.
Need to get 332 kB of archives.
After this operation, 997 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
lrzsz minicom
Install these packages without verification? [y/N] y
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main lrzsz armhf 0.12.21-7
404 Not Found [IP: 93.93.128.193 80]
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main minicom armhf 2.7-1+deb8u1
404 Not Found [IP: 93.93.128.193 80]
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/l/lrzsz/lrzsz_0.12.21-7_armhf.deb 404 Not Found [IP: 93.93.128.193 80]
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/m/minicom/minicom_2.7-1+deb8u1_armhf.deb 404 Not Found [IP: 93.93.128.193 80]
E: Internal Error, ordering was unable to handle the media swap
浏览 URL 时,问题似乎在于apt-get
查找旧版本的软件包,这些版本已不再位于存储库中。
我怎样才能解决这个问题?
更新:从评论来看,解决此问题的方法似乎是更新(重新安装)操作系统版本。在咨询了负责维护我们的设置的人员后,我们碰巧在这些机器上运行了许多专有和遗留的部分,因此决定不久前冻结配置。
我可以告诉我apt-get
寻找旧的软件包版本吗?如果是这样,我在哪里可以找到这些版本?
答案1
发现这里,您必须将所有出现的 archive.raspberrypi.org 或mirrordirector.raspbian.org 替换为legacy.raspbian.org(这是一个官方网站)。