安装DEB包同时安装依赖文件

前端之家收集整理的这篇文章主要介绍了安装DEB包同时安装依赖文件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

在安装deb文件的时候,常见的安装方式为

sudo dpkg -i xxx.deb

但是,有些deb文件是有依赖文件的,如果本地没有安装这些依赖文件,则导致的结果常常是安装失败。
如我在安装remarkable的时候,提示

Selecting prevIoUsly unselected package remarkable.
(Reading database ... 325261 files and directories currently installed.)
Preparing to unpack remarkable_1.87_all.deb ...
Unpacking remarkable (1.87) ...
dpkg: dependency problems prevent configuration of remarkable:
 remarkable depends on python3-markdown; however:
  Package python3-markdown is not installed.
 remarkable depends on gir1.2-webkit-3.0; however:
  Package gir1.2-webkit-3.0 is not installed.
 remarkable depends on wkhtmltopdf; however:
  Package wkhtmltopdf is not installed.

dpkg: error processing package remarkable (--install):
 dependency problems - leaving unconfigured
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu1) ...
No such key 'Gtk/IMModule' in schema 'org.gnome.settings-daemon.plugins.xsettings' as specified in override file '/usr/share/glib-2.0/schemas/50_sogoupinyin.gschema.override'; ignoring override for this key.
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Errors were encountered while processing:
 remarkable

解决方法

  1. 执行完dpkg命令后,执行sudo apt-get -f install 1;
  2. 安装gdebi,之后执行sudo gdebi package.deb`会自动安装上依赖文件2

参考文献

猜你在找的设计模式相关文章