首页 > 解决方案 > libgnutls28-dev:apt 正在搜索错误的文件?

问题描述

我在 debian buster 上安装 libgnutls28-dev 包时遇到问题,apt 抛出以下内容:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  gnutls-bin gnutls-doc
The following NEW packages will be installed:
  libgnutls28-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,086 kB of archives.
After this operation, 4,417 kB of additional disk space will be used.
Err:1 http://deb.debian.org/debian buster/main amd64 libgnutls28-dev amd64 3.6.7-4
  404  Not Found [IP: 151.101.220.204 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/gnutls28/libgnutls28-dev_3.6.7-4_amd64.deb  404  Not Found [IP: 151.101.220.204 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

让我烦恼的是该软件包可在http://deb.debian.org/debian/pool/main/g/gnutls28/libgnutls28-dev_3.6.7-4+deb10u2_amd64.deb 获得,出于某种原因,apt 是寻找libgnutls28-dev_3.6.7-4_amd64.deb而不是libgnutls28-dev_3.6.7-4+deb10u2_amd64.deb.

我尝试使用运行的特定版本apt install libgnutls28-dev=3.6.7-4+deb10u2并得到以下结果:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '3.6.7-4+deb10u2' for 'libgnutls28-dev' was not found

问题是这从何而来?这是一个apt问题吗?还是它gnutls28误导了依赖关系?还是应该首先有一个文件libgnutls28-dev_3.6.7-4_amd64.deb

[编辑]

根据 Knud 的评论添加此内容:

根据apt系统是最新的:

apt update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian buster-updates InRelease
Hit:3 http://security.debian.org/debian-security buster/updates InRelease            
Hit:4 http://deb.debian.org/debian buster-backports InRelease                        
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

我与其中一个软件包维护者确认,可用版本_3.6.7-4+deb10u2 最新版本,并且apt应该知道这一点,但是:

apt-cache policy libgnutls28-dev
libgnutls28-dev:
  Installed: (none)
  Candidate: 3.6.7-4
  Version table:
     3.6.7-4 500
        500 http://deb.debian.org/debian buster/main amd64 Packages

所以这是一个apt问题。出于某种原因apt,即使拥有超级牛的力量,也会陷入过时的状态。任何指导将不胜感激。

标签: linuxaptgnutlsdebian-buster

解决方案


感谢 Andreas Metzler 的善意指导,找到了解决方案。

镜子显然被一个过时的包裹索引卡住了。据我了解,我正在使用deb.debian.org它重定向apt到附近的服务器。我更新了sources.list文件,/etc/apt/所以它们现在指向附近的固定服务器,一切运行正常。


推荐阅读