我正在尝试使用 apt-get use Acquire::By-Hash option
,因此它将下载通过加密哈希而不是包版本来识别它们的包。这应该可以防止在尝试 apt-get 安装某些东西时有时发生竞争条件和“哈希和不匹配”错误。
我无法让 apt-get 使用这种方法。我试过
Acquire::By-Hash "force";
到/etc/apt/apt.conf.d/51acquire_by_hash
deb [by-hash=force] http://ftp.us.debian.org/debian/ buster main contrib non-free
-o Acquire::by-hash=force
apt-get 选项都不起作用。apt-get 仍然使用旧方法(查看它请求的 URL)# apt-get -o Acquire::by-hash=force -o Debug::Acquire::http=true install fortunes
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
fortunes
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,117 kB of archives.
After this operation, …
Run Code Online (Sandbox Code Playgroud) apt ×1