dpkg python 依赖项

dpkg python 依赖项

尝试安装天气应用导致了依赖性问题:

myhost:~/Downloads$ sudo dpkg -i indicator-weather_0.9-0ubuntu4_all.deb 
Selecting previously unselected package indicator-weather.
(Reading database ... 214200 files and directories currently installed.)
Preparing to unpack indicator-weather_0.9-0ubuntu4_all.deb ...
Unpacking indicator-weather (0.9-0ubuntu4) ...
dpkg: dependency problems prevent configuration of indicator-weather:
 indicator-weather depends on python-gtk2; however:
  Package python-gtk2 is not installed.
 indicator-weather depends on python-gi; however:
  Package python-gi is not installed.

dpkg: error processing package indicator-weather (--install):
 dependency problems - leaving unconfigured
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160701-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Errors were encountered while processing:
 indicator-weather
  1. 是否存在命令/技术可以在安装时自动解决依赖问题?
  2. 是否有一个巧妙的命令可以在安装后自动解析命令?
  3. 最简单的解决方案是安装 pyton-gtk2 和 gi,然后重新运行安装命令吗?

感谢您提供命令行示例。

答案1

安装软件包并从存储库获取依赖项

sudo gdebi package.deb

如果你已经安装了缺少依赖项的软件包,则可以使用以下命令自动下载并安装依赖项

sudo apt-get -f install

另外还有一个图形版本gdebi-gtk,链接到.debnautilus 右键单击​​操作“使用 GDebi 包安装程序打开”。

相关内容