ubuntu – “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搜索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

我已经多次更新了.我尝试了很多不同的debs,并没有发现任何其他地方的错误.

这里的问题是你的二进制包(deb)与你的源包(deb-src)不一致.由于squid3来自sid,请添加以下行:
deb-src http://ftp.us.debian.org/debian sid main

这应该解决它

相关文章

文章浏览阅读2.3k次,点赞4次,收藏22次。最近安装了CARLA预...
文章浏览阅读6.3k次,点赞5次,收藏15次。在清华镜像中下载U...
文章浏览阅读5k次。linux环境, python3.7.问题描述: 安装...
文章浏览阅读4.2k次,点赞4次,收藏17次。要安装这个 standa...
文章浏览阅读894次,点赞51次,收藏31次。在安卓使用vscode主...