linux apt下载软件,linux – APT如何选择安装哪些软件包?

在我的Debian测试框中,我在/etc/apt/sources.list中有以下内容:

deb http://ftp.us.debian.org/debian/ testing main contrib non-free

deb-src http://ftp.us.debian.org/debian/ testing main contrib non-free

deb http://security.debian.org/ testing/updates main contrib non-free

deb-src http://security.debian.org/ testing/updates main contrib non-free

deb http://ftp.us.debian.org/debian/ testing-updates main contrib non-free

deb-src http://ftp.us.debian.org/debian/ testing-updates main contrib non-free

deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse proposed partner

deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse

deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse proposed partner

deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse

然后假设我运行sudo apt install libre-office.我看到它从ftp.us.debian.org中选择了一些必需的包,从us.archive.ubuntu.com中选择了一些包. APT如何决定从哪个源获取每个包p>

解决方法:

apt_preferences手册页中详细描述了该算法.简而言之,apt根据命令行选项,配置和已安装的软件包计算它所知道的每个版本的分数.然后安装具有最高分的版本.

您可以通过为显式源指定显式分数来调整内容,如同一手册页中所述.

另外,Debian和Ubuntu这样的混合版本不太可能正常工作;我会建议反对它.

标签:linux,apt,package-management

文章知识点与官方知识档案匹配,可进一步学习相关知识CS入门技能树Linux入门在线安装软件25392 人正在系统学习中 相关资源:菠菜一键破解-软件测试工具类资源-CSDN文库

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2021年4月2日
下一篇 2021年4月2日

相关推荐