Debian 9 无法安装 Google Chrome

Com*_*ewb 3 debian chrome

我已经从可启动的 USB 闪存驱动器安装了 Debian 9。我只将 1 张 DVD 复制到它上面,因为这是我需要的所有 Debian 站点。我在整个分区上安装了 Debian(我没有将其分解为 /home 或任何其他内容)。我安装了 GNOME 桌面。我没有使用网络安装,因为我的连接很糟糕(我首先必须去学校下载 .iso)。

我的第一次尝试将 chrome 添加到 /etc/apt/sources.list deb http://dl.google.com/linux/chrome/deb/ stable main

然后我跑了

get https://dl-ssl.google.com/linux/linux_signing_key.pub

sudo apt-key add linux_signing_key.pub

sudo apt-get update

sudo apt-get install google-chrome-stable
Run Code Online (Sandbox Code Playgroud)

这是出来的:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 google-chrome-stable : Depends: gconf-service but it is not installable
                    Depends: libgconf-2-4 (>= 3.2.5) but it is not             installable
                    Depends: libappindicator1 but it is not installable
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)

因此,我尝试从 Google 本身下载解压缩安装程序。首先我跑了

apt-get clean && apt-get update
apt-get upgrade
apt --fix-broken install
Run Code Online (Sandbox Code Playgroud)

然后我跑了

dpkg -i google-chrome-stable_current_amd64.deb 
Run Code Online (Sandbox Code Playgroud)

从我的下载目录。那吐出来的

Selecting previously unselected package google-chrome-stable.
(Reading database ... 125174 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (60.0.3112.90-1) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
 google-chrome-stable depends on gconf-service; however:
Package gconf-service is not installed.
google-chrome-stable depends on libgconf-2-4 (>= 3.2.5); however:
Package libgconf-2-4 is not installed.
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.6.1-2) ...
Processing triggers for gnome-menus (3.13.3-9) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for mime-support (3.60) ...
Errors were encountered while processing:
 google-chrome-stable
Run Code Online (Sandbox Code Playgroud)

我在这里做错了什么?我需要未随 USB 可引导磁盘安装的依赖项,但我无法获得这些依赖项。我尝试在突触包安装程序中搜索这些依赖项,但找不到它们。

sou*_*edi 5

看起来您需要下载额外的 Debian 软件包,但是您的 sources.list文件不包含完整的在线 Debian 软件包存储库。

有几个人遇到过这个问题。[1] 可能发生的原因之一是 Debian 安装程序没有看到互联网连接。或者您可能在某个时候删除了存储库:-)。

确保您的/etc/apt/sources.list文件包含以下几行:

# Debian release 9.x
deb http://deb.debian.org/debian stretch main
deb-src http://deb.debian.org/debian stretch main

# Security updates
deb http://deb.debian.org/debian-security/ stretch/updates main
deb-src http://deb.debian.org/debian-security/ stretch/updates main
Run Code Online (Sandbox Code Playgroud)

然后运行apt update。然后再次尝试安装,使用命令 apt install google-chrome-stable

apt现在是交互式使用的推荐命令。 apt-get不太友好,特别apt-get upgrade 是不安装一些非常重要的安全更新。)

我不知道在您添加了在线 Debian 存储库后会发生什么。即,如果您想从 USB(Debian DVD #1)安装一些软件包,是否必须返回并删除在线存储库。


[1] 请参阅此链接的评论:如何在没有游戏、办公室等的情况下安装 debian...?