apt-get - 源存储在哪里?

apt-get - 源存储在哪里?

我尝试更新apt-get,但一直收到 404 错误 - 我以为是代理的错误,导致wget浏览器出现错误,但在访问其中一个报告错误的链接时,我发现它试图下载“Sources”文件,而服务器上的文件实际上存储为“Sources.bz2”

我能够从中获取来源列表 - 我应该把它放在哪里以便apt-get使用它们?

编辑:当前来源.列表(Ubuntu 14.04)

#------------------------------------------------------------------------------#
#                            OFFICIAL UBUNTU REPOS                             #
#------------------------------------------------------------------------------#


###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse 

当前的 apt.conf

Acquire::http::User-Agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36";
Acquire::http::Proxy "http://129.###.###.###:80";

答案1

您的sources.list存储在/etc/apt/文件夹中。要查看和编辑它们,您可以运行:

cat /etc/apt/sources.list

要编辑该文件,请运行:

sudo nano /etc/apt/sources.list

或者

sudo apt edit-sources

您的 PPA 存储于:

ls /etc/apt/sources.list.d/*

尽管请提及手动编辑这些文件时,请确保您知道自己在做什么/编辑什么,所添加的这个/那些存储库/源一定适用于您当前的发行版,否则您可能会破坏/损坏您的apt。通常在添加新存储库时,您应该运行:

sudo add-apt-repository some:ppa

答案2

不确定你的意思是这个: /etc/apt/sources.list

相关内容