如何在apt包管理器的sources.list中同时拥有arch=amd64和trusted=yes?

Tar*_*nti 23 package-management aptitude synaptic apt localrepository

我想做什么?

你可以有
deb [trusted=yes] http://pathtoserver/ubuntu bionic main
deb [arch=amd64] http://pathtoserver/ubuntu bionic main

分别在sources.list中。

有没有办法我可以做
deb [trusted=yes, arch=amd64] http://pathtoserver/ubuntu bionic main或类似的事情,我只能将 amd64 作为选项并且可信应该是肯定的。在 Ubuntu 18.04 仿生中。


错误

如果我使用以下 deb 行
deb [arch=amd64 trusted=yes] http://pathtoserver/ubuntu bionic main

E: Conflicting values set for option Trusted regarding source
E: The list of sources could not be read.
Run Code Online (Sandbox Code Playgroud)

这是一个气隙系统,我已经镜像了 ubuntu 存储库以供离线使用。

小智 21

正如您看到的,感谢@Terrance 的评论,您需要像这样放置选项:([trusted=yes arch=amd64]没有特定的顺序)。

关于您的第二个错误,这是因为您有另一个条目使用相同的 URL (http://pathtoserver/ubuntu) 但没有[trusted=yes].

例如,如果您有一项“发布”条目和一项“源”条目,则它们需要具有[trusted=yes].