即使不是发布日,从主 Ubuntu 存档下载也很慢,我如何让 apt-get 自动使用离我很近的镜像?
在执行aptitude update
/apt-get update
或使用更新管理器进行更新时,有时我会访问需要很长时间的存储库链接。百分比并没有结束,它需要很长时间才能忽略它。
如何缩短时间,以便如果特定存储库连接或完成的时间超过 10 秒,则应忽略它并移动以下存储库。这是解释问题的图像:
它正在尝试连接到archive.ubuntu.com,但由于它花费的时间太长,它只是在那里停留了至少 3 到 5 分钟(尚未测量时间),然后它显示为已忽略并移动到以下内容。我希望将其更改为秒而不是分钟。
我们是一个分布式团队,这就是我们的 VM 使用 Ubuntumirror://
设置的原因。我们的/etc/apt/sources.list
样子如下:
deb mirror://mirrors.ubuntu.com/mirrors.txt lucid main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt lucid-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt lucid-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt lucid-security main restricted universe multiverse
Run Code Online (Sandbox Code Playgroud)
这本身就非常了不起,对在不同地点工作的人非常有帮助——不需要本地定制等。理论上的故障转移。
在日常工作中,此设置经常失败。这周我想说2-3次。
现在作为我的壁橱镜子mirrors.ubuntu.com
回来了ftp.uni-bayreuth.de
。不幸的是,它似乎下降了。
这已经持续了几个小时,镜子由一所大学的志愿者主持,今天是星期五,我希望这会很快得到纠正。
所有的谈话,我的问题是:
在终端中,可以通过使用 apt-fast(使用 Axel)来实现。
但是有可能在 Synaptic Manager 中使用 Axel 和 apt-fast 吗?
我找到了这个建议,但如果没有 Ask Ubuntu 的帮助,我不会尝试它:)
我正在使用 Ubuntu 16.04 LTS。今天早上跑的时候sudo apt-get update
,遇到如下错误:
W: The repository 'http://us.archive.ubuntu.com/ubuntu lucid Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/source/Sources 404 Not Found [IP: 91.189.91.26 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Run Code Online (Sandbox Code Playgroud)
我已经在互联网上查看了答案。虽然我确实找到了一些类似的帖子,但没有一个解决方案适合我。我尝试过的有趣解决方案之一是:
最简单的解决方案是执行以下两个步骤:
1- 备份你的源列表 -> sudo …
许多服务器管理员希望他们的服务器仅供人类使用,而不是由诸如wget
. 阻止此类程序的一种方法是使用日志分析。日志分析通过寻找请求之间具有统计意义的相似性来识别检索程序,通常是通过计时。
每当我尝试使用 wget通过 shell 脚本(类似于 由 创建的那些synaptic
,大部分实际上是由 创建的synaptic
)下载包时,只有少数包被下载,并且大多数包由于连接拒绝而无法下载。
所以我强烈认为连接被拒绝的最可能原因是 Ubuntu 服务器使用日志分析来阻止程序。
Ubuntu 服务器是否使用日志分析来阻止(包检索)程序?
编辑:
我执行了一些包含小尺寸包的脚本(即,它们会在更短的时间内下载)。此类脚本按预期正常工作。错误出现在尺寸较大的包中(因此它们需要更多时间)。
哪些协议更适合在文件中使用/etc/apt/sources.list
?HTTP 还是 FTP?
例如:
deb http://archive.ubuntu.com/ubuntu saucy main universe restricted multiverse
Run Code Online (Sandbox Code Playgroud)
或者:
deb ftp://ftp.archive.ubuntu.com/ubuntu/ saucy main universe restricted multiverse
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 更新我的系统apt-get
,但它给了我这个错误
Err http://bd.archive.ubuntu.com raring Release.gpg
Could not connect to bd.archive.ubuntu.com:80 (116.193.170.18), connection timed out
Err http://bd.archive.ubuntu.com raring-updates Release.gpg
Unable to connect to bd.archive.ubuntu.com:http:
Err http://bd.archive.ubuntu.com raring-backports Release.gpg
Unable to connect to bd.archive.ubuntu.com:http:
Reading package lists... Done
W: Failed to fetch http://bd.archive.ubuntu.com/ubuntu/dists/raring/Release.gpg Could not connect to bd.archive.ubuntu.com:80 (116.193.170.18), connection timed out
W: Failed to fetch http://bd.archive.ubuntu.com/ubuntu/dists/raring-updates/Release.gpg Unable to connect to bd.archive.ubuntu.com:http:
W: Failed to fetch http://bd.archive.ubuntu.com/ubuntu/dists/raring-backports/Release.gpg Unable to connect to bd.archive.ubuntu.com:http:
W: Some index files failed to download. …
Run Code Online (Sandbox Code Playgroud)