首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >为什么Raspbian无法正确获得解决包版本?

为什么Raspbian无法正确获得解决包版本?
EN

Unix & Linux用户
提问于 2022-01-05 21:22:29
回答 1查看 1.6K关注 0票数 0

我试图在RaspberryPi (可能是3B型号)上安装几个实用程序,但是apt-get命令解析包版本有问题。

具体来说,在尝试安装minicom时,我会得到以下错误。它与“telnet”和“putty”类似:

代码语言:javascript
运行
复制
$ 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?

按照关于错误消息的建议,我尝试了更新,但得到了类似的错误:

代码语言:javascript
运行
复制
$ 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.

..。还包括:

代码语言:javascript
运行
复制
$ 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查找那些不再在回购程序中的旧版本的包。

我怎么才能解决这个问题?

update :从注释中看,解决这个问题的方法是更新(重新安装)操作系统版本。在与负责维护我们的设置的人协商后,我们碰巧在这些机器上运行了许多专有的和遗留的部分,因此决定在一段时间前冻结配置。

我能告诉apt-get寻找旧的包版本吗?如果是的话,我在哪里可以找到这些版本?

EN

回答 1

Unix & Linux用户

发布于 2022-07-20 14:18:10

正如发现的这里一样,您必须将archive.raspberrypi.org或mirrordirector.raspbian.org的每次出现替换为legacy.raspbian.org,这是一个官方站点。

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/685222

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档