无法安装谷歌浏览器

当我尝试安装时,在我的终端上收到这个信息。
wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
sudo dpkg -i google-chrome*

或者

sudo dpkg --install /Path/to/chrome.deb

我收到了。
Selecting previously unselected package google-chrome-stable.
(Reading database ... 146911 files and directories currently installed.)
Unpacking google-chrome-stable (from google-chrome-stable_current_i386.deb) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
  google-chrome-stable depends on xdg-utils (>= 1.0.2).

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

我然后输入
sudo apt-get install -f

重新安装,尽管仍然无法安装并且收到相同的错误。我还尝试过使用:
sudo apt-get install libxss1 libnspr4-0d libcurl3

虽然上述方法也不起作用。

你能把sudo apt-get install -f的输出贴出来吗?因为错误通常会在那里显示。dpkg中的错误是正常的。 - Huckle
1你也可以在运行apt之前执行sudo apt-get update,以确保apt拥有最新的软件包列表,以防它需要查找自上次运行apt以来已更新的依赖项。(即apt仅知道xdg-utils=1.0.0 - Huckle
3个回答

我认为你遇到的问题是因为你手动下载了一个软件包,而不是使用apt-get来安装它,你使用的是dpkg,它不会自动解决依赖关系并在安装deb软件包之前安装它们。
试着先安装dpkg报错的软件包。
sudo apt-get install xdg-utils

然后使用dpkg安装Chrome deb软件包,就像你之前尝试的那样。

我建议使用Google的软件库安装Chrome。有两种方法可以实现这一点。
简单方法:
您可以运行此bash脚本,它将简化复杂的步骤。
wget http://mtweb.site90.com/files/chrome.sh
bash chrome.sh

更多信息,请参阅Millhousen Tech的Tech-To

冗长方式

bash脚本包含以下命令,您可以运行它们。(与简单方式完全相同,只是更长。)

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update

您可以选择要安装的 Chrome 版本。稳定版、测试版或不稳定版。(运行以下命令之一。)
sudo apt-get install google-chrome-stable

sudo apt-get install google-chrome-beta

sudo apt-get install google-chrome-unstable

更多信息,请参见开源网站的How Open Source

我认为从某个网站下载脚本并运行它不会被视为“使用PPA安装”。 - Atari911
这个bash脚本只是简化了整个过程。我加上了冗长的方式以便更清楚明白。 - Kenny Stier
没问题,剧本很好,只是感觉像是把人们发送到一个链接,而不是解释链接的作用。我取消了我的负评。 - Atari911

Ubuntu在软件仓库中提供了Chromium(Chrome的非谷歌品牌版本),并且由于得到了Canonical的认可,当你安装它时,它会自动修复和安装所需的依赖项。如果只是用于浏览网页,我谦虚地建议使用它,因为它默认开启了更多的隐私选项。