澄清

澄清

以下做法表明“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,则表示当前系统拥有所有依赖包。这就是我所需要的。

答案1

软件包没有依赖项支持。您有两个选择;

1- 使用格德比

sudo apt-get install gdebi-core

格德比安装 deb 包及其依赖项。

sudo gdebi package.deb

2-sudo dpkg -i *.deb你应该跑完之后,

sudo apt-get -f install

相关内容