apt-get 更新使用错误的 repo 地址

apt-get 更新使用错误的 repo 地址

我继承了一个用于连接到我们内部服务器以更新和下载软件包的节点。此后,我从内部 VLAN 中取出了该节点,删除了目录/etc/apt/sources.list.d/,并更新了/etc/apt/sources.list以下内容:

###### Debian Main Repos
deb http://deb.debian.org/debian/ oldstable main contrib
deb-src http://deb.debian.org/debian/ oldstable main contrib

deb http://deb.debian.org/debian/ oldstable-updates main contrib
deb-src http://deb.debian.org/debian/ oldstable-updates main contrib

deb http://deb.debian.org/debian-security oldstable/updates main
deb-src http://deb.debian.org/debian-security oldstable/updates main

deb http://ftp.debian.org/debian jessie-backports main
deb-src http://ftp.debian.org/debian jessie-backports main

当我这样做时apt-get update,我看到的是:

Err http://deb.debian.org oldstable InRelease                                 

Err http://ftp.debian.org jessie-backports InRelease                          

Err http://deb.debian.org oldstable-updates InRelease                         

Err http://deb.debian.org oldstable/updates InRelease

Err http://ftp.debian.org jessie-backports Release.gpg
  Unable to connect to [our internal server]:
Err http://deb.debian.org oldstable Release.gpg
  Unable to connect to [our internal server]:
Err http://deb.debian.org oldstable-updates Release.gpg
  Unable to connect to [our internal server]:
Err http://deb.debian.org oldstable/updates Release.gpg
  Unable to connect to [our internal server]:
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/oldstable/InRelease  

W: Failed to fetch http://deb.debian.org/debian/dists/oldstable-updates/InRelease  

W: Failed to fetch http://deb.debian.org/debian-security/dists/oldstable/updates/InRelease  

W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/InRelease  

W: Failed to fetch http://deb.debian.org/debian/dists/oldstable/Release.gpg  Unable to connect to [our internal server]:

W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/Release.gpg  Unable to connect to [our internal server]:

W: Failed to fetch http://deb.debian.org/debian/dists/oldstable-updates/Release.gpg  Unable to connect to [our internal server]:

W: Failed to fetch http://deb.debian.org/debian-security/dists/oldstable/updates/Release.gpg  Unable to connect to [our internal server]:

W: Some index files failed to download. They have been ignored, or old ones used instead.

我不确定为什么它仍然尝试连接到属于不同 VLAN 的内部服务器。有人可以指导我吗?

答案1

终于搞明白了。我照做了apt-config dump,发现它有代理设置。进入/etc/apt/apt.conf.d/并注释掉所有以 开头的行Acquire::HTTP::Proxy

相关内容