无法安装 Google Chrome。如何解决?

无法安装 Google Chrome。如何解决?

我无法安装 Google Chrome 浏览器。我想知道为什么以及如何修复它。这是我在安装 Google Chrome 时从终端获取的日志。

$ sudo dpkg --install chrome.deb
[sudo] password for young: 
Selecting previously unselected package google-chrome-stable.
(Reading database ... 141861 files and directories currently installed.)
Unpacking google-chrome-stable (from chrome.deb) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
 google-chrome-stable depends on libgconf2-4 (>= 2.27.0); however:
  Package libgconf2-4 is not installed.
 google-chrome-stable depends on libnss3-1d (>= 3.12.3); however:
  Package libnss3-1d is not installed.
 google-chrome-stable depends on libxss1; however:
  Package libxss1 is not installed.

dpkg: error processing google-chrome-stable (--install):
 dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for gnome-menus ...
Processing triggers for man-db ...
Errors were encountered while processing:
 google-chrome-stable

$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  linux-headers-3.5.0-17
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  google-chrome-stable
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 140 MB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 141960 files and directories currently installed.)
Removing google-chrome-stable ...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for gnome-menus ...

$ sudo dpkg --install chrome.deb
Selecting previously unselected package google-chrome-stable.
(Reading database ... 141861 files and directories currently installed.)
Unpacking google-chrome-stable (from chrome.deb) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
 google-chrome-stable depends on libgconf2-4 (>= 2.27.0); however:
  Package libgconf2-4 is not installed.
 google-chrome-stable depends on libnss3-1d (>= 3.12.3); however:
  Package libnss3-1d is not installed.
 google-chrome-stable depends on libxss1; however:
  Package libxss1 is not installed.

dpkg: error processing google-chrome-stable (--install):
 dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for gnome-menus ...
Processing triggers for man-db ...
Errors were encountered while processing:
 google-chrome-stable

它在 GUI 中也无法工作。看看我得到了什么:

在 GUI 上

答案1

您可以通过安装缺失的依赖项来修复此问题。
只需运行以下命令
(在运行之后sudo dpkg -i google-chrome-stable_current_i386.deb)。

sudo apt-get install -f

这将安装缺少的依赖项并为您配置 Google Chrome。

答案2

您可能需要启用“universe”存储库。

一旦启用它,请更新您的系统,然后您现在就可以安装google-chrome-stable

sudo apt-get update
sudo apt-get install libgconf2-4 libnss3-1d libxss1

答案3

为什么不直接从 Ubuntu 存储库安装 Chromium?

sudo apt-get install chromium-browser

就这么简单!

答案4

sudo apt-get update ; sudo apt-get install libgconf2-4 libnss3-1d libxss1

在这里发布任何错误输出。如果没有错误,sudo dpkg -i chrome.deb之后再做一次,你应该就好了。

相关内容