以下实践表明“ dpkg --dry-run”不执行依赖关系检查,或者至少我不知道该怎么做。如果我想确保在安装软件包之前清除依赖关系,该怎么办?非常感谢您的帮助。
$ sudo dpkg -i --dry-run bsdgames_2.17-21_amd64.deb
(Reading database ... 120870 files and directories currently installed.)
Preparing to replace bsdgames 2.17-21 (using bsdgames_2.17-21_amd64.deb) ...
$ echo $?
0
$ sudo dpkg -i bsdgames_2.17-21_amd64.deb
(Reading database ... 120870 files and directories currently installed.)
Preparing to replace bsdgames 2.17-21 (using bsdgames_2.17-21_amd64.deb) ...
Unpacking replacement bsdgames ...
dpkg: dependency problems prevent configuration of bsdgames:
bsdgames depends on wamerican | wordlist; however:
Package wamerican is not installed.
Package wordlist is not installed.
dpkg: error processing bsdgames (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:
bsdgames
澄清度
我不希望dpkg为我安装依赖项。我只想要一些命令来检查软件包的依赖关系。如果命令返回0,则表示当前系统具有所有依赖的程序包。这就是我所需要的。
apt-get -f install
之后运行dpkg -i *.deb
-是在每次运行之后还是仅在失败时运行?我正在尝试将.debs安装为本地文件,而不是在存储库中,dpkg
并且无法满足依赖关系。因此,如果我apt-get
随后运行,它将找到本地的.deb。软件包(它在那里,只是使用不能正确安装依赖项dpkg -i
),还是只尝试在中配置的存储库sources.list
?