“apt-get source”找不到包,但“apt-get install”和“apt-get cache”可以找到它

“apt-get source”找不到包,但“apt-get install”和“apt-get cache”可以找到它

我正在尝试下载软件包的源代码,但是当我运行

root@proxy:~# apt-get source squid3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Can not find version '3.3.8-1.1' of package 'squid3'
E: Unable to find a source package for squid3

找不到。但是当我运行它时apt-cache search squid3,它找到了它。

root@proxy:~# apt-cache search squid3
squid-cgi - Full featured Web Proxy cache (HTTP proxy) - control CGI
squid3 - Full featured Web Proxy cache (HTTP proxy)
squid3-common - Full featured Web Proxy cache (HTTP proxy) - common files
squid3-dbg - Full featured Web Proxy cache (HTTP proxy) - Debug symbols
squidclient - Full featured Web Proxy cache (HTTP proxy) - control utility

apt-get install squid3也运行良好。我使用的是 Ubuntu 11.04 服务器,这是我的 /etc/apt/sources.list

deb http://old-releases.ubuntu.com/ubuntu natty main restricted universe
deb http://old-releases.ubuntu.com/ubuntu natty-updates main restricted universe
deb http://old-releases.ubuntu.com/ubuntu natty-security main restricted universe
deb http://archive.canonical.com/ubuntu natty partner
deb http://ftp.us.debian.org/debian sid main
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
deb http://archive.ubuntu.com/ubuntu natty universe
deb-src http://archive.ubuntu.com/ubuntu natty universe

我已经多次使用 apt-get 更新。我尝试过许多不同的 deb,但没有在其他地方发现此错误。

答案1

这里的问题是您的二进制包 (deb) 与源包 (deb-src) 不一致。由于 squid3 来自 sid,因此添加此行:

deb-src http://ftp.us.debian.org/debian sid main

这应该可以解决问题

相关内容