如何让`dpkg -i`为我安装依赖项?

Modified on: Sat, 09 Jun 2018 01:24:53 +0800

说,我有foo-1.2.3.deb,它取决于perlpython,但运行命令:

dpkg -i ./foo-1.2.3.deb

不会安装这些依赖项。所以我必须手动apt-get install perl python

如何让dpkg -i自动为我安装这些依赖项?

最佳答案

使用dpkg后,运行以下命令帮助我安装所需的依赖项:

sudo apt-get -f install

总之,您的终端应如下所示:

$ sudo dpkg -i package_with_unsatisfied_dependencies.deb
dpkg: dependency problems prevent ... 
[additional messages]

$ sudo apt-get -f install
[apt messages]
Setting up [dependency]...
Setting up package_with_unsatisfied_dependencies...

注意关于Setting up package_with_unsatisfied_dependencies的行。此修复(并完成)package_with_unsatisfied_dependencies.deb的安装。< / p>


相关问答

添加新评论