在 Ubuntu 中,默认的 Google Chrome 安装总是失败。如何修复它。
$ sudo dpkg -i google-chrome-stable_current_amd64.deb
(Reading database ... 176142 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (43.0.2357.65-1) over (43.0.2357.65-1) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
google-chrome-stable depends on libappindicator1; however:
Package libappindicator1 is not installed.
dpkg: error processing package google-chrome-stable (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu5) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.1+15.04.20150202-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.58ubuntu1) ...
Errors were encountered while processing:
google-chrome-stable
答案1
可以通过运行以下命令来修复此问题
sudo apt-get install -f
答案2
在 Ubuntu 和 Docker 上安装时,对我有帮助的libappindicator1
是手动安装此包。此外,它依赖于另一个libindicator7
。
RUN curl -p --insecure "http://de.archive.ubuntu.com/ubuntu/pool/universe/liba/libappindicator/libappindicator1_12.10.1+18.04.20180322.1-0ubuntu1_amd64.deb" --output libappindicator1_0.4.92-8_amd64.deb \
&& curl -p --insecure "http://de.archive.ubuntu.com/ubuntu/pool/universe/libi/libindicator/libindicator7_16.10.0+18.04.20180321.1-0ubuntu1_amd64.deb" --output libindicator7_0.5.0-4_amd64.deb \
&& dpkg -i libindicator7_0.5.0-4_amd64.deb \
&& dpkg -i libappindicator1_0.4.92-8_amd64.deb \
&& rm libindicator7_0.5.0-4_amd64.deb \
&& rm libappindicator1_0.4.92-8_amd64.deb