在 Debian Squeeze 上无法使用 apt-get 源找到源包

在 Debian Squeeze 上无法使用 apt-get 源找到源包

我有一台运行 Debian Squeeze 的旧服务器。我正在尝试下载某些软件包的源代码,以便我可以手动修补它。但是,apt-get source我尝试的每个包都失败了。一个例子:

root@xxxx:/home/myhomedir# apt-get source emacs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Ignore unavailable target release 'stable' of package 'emacs'
E: Unable to find a source package for 

我尝试的每个其他源包都会重复同样的错误。但是,安装具有相同名称的包是可行的(例如apt-get install emacs)。以下是我的内容sources.list

# the basic archive
deb ftp://ftp.fi.debian.org/debian/ squeeze-lts main non-free contrib
deb-src ftp://ftp.fi.debian.org/debian/ squeeze-lts main non-free contrib

# the security patches
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

我最初认为这是因为我收到的错误apt-get update(请参阅我之前的问题apt-get 更新在 debian freeze 上失败并显示“找不到文件”),但这现已修复,我仍然无法下载源代码。

答案1

Debian Squeeze 是生命尽头

要继续使用不受支持的软件包,您需要指向apt-get不同的存储库。

编辑/etc/apt/sources.list,注释掉前面的所有行# 并添加以下行:

deb http://archive.debian.org/debian/ squeeze contrib main non-free

这将允许您从 Debian 存档站点访问最新发布的 Squeeze 版本。

答案2

APT::Default-Release "stable";您的配置中的线路正在将您固定到您的线路上stable,但您的线路debdeb-src线路均未提供该线路(stable现在是jessie)。为了能够apt-get source在不升级整个发行版的情况下使用,您应该注释该行或更改stablesqueeze-lts.

请注意,您不需要root运行apt-get source,您可以以标准用户身份运行它。

另外,如加雷思·红指出,Squeeze 不再受支持(重要的是,这意味着它不再接收安全更新)。不仅如此,而且挤压LTS本身也不再受支持,因此您应该尽早迁移到 Wheezy LTS 或 Jessie。

相关内容