每当我尝试安装 chrome 时都会出现依赖性问题?

每当我尝试安装 chrome 时都会出现依赖性问题?
dpkg -i /root/Downloads/google-chrome-stable_current_amd64.deb
Selecting previously unselected package google-chrome-stable:amd64.
(Reading database ... 66306 files and directories currently installed.)
Preparing to unpack .../google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable:amd64 (81.0.4044.113-1) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:amd64:
 google-chrome-stable:amd64 depends on libappindicator3-1.
 google-chrome-stable:amd64 depends on libasound2 (>= 1.0.16).
 google-chrome-stable:amd64 depends on libatk-bridge2.0-0 (>= 2.5.3).
 google-chrome-stable:amd64 depends on libatk1.0-0 (>= 2.2.0).
 google-chrome-stable:amd64 depends on libatspi2.0-0 (>= 2.9.90).
 google-chrome-stable:amd64 depends on libc6 (>= 2.16).
 google-chrome-stable:amd64 depends on libcairo2 (>= 1.6.0).
 google-chrome-stable:amd64 depends on libcups2 (>= 1.4.0).
 google-chrome-stable:amd64 depends on libdbus-1-3 (>= 1.5.12).
 google-chrome-stable:amd64 depends on libdrm2 (>= 2.4.38).
 google-chrome-stable:amd64 depends on libexpat1 (>= 2.0.1).
 google-chrome-stable:amd64 depends on libgbm1 (>= 8.1~0).
 google-chrome-stable:amd64 depends on libgcc1 (>= 1:3.0).
 google-chrome-stable:amd64 depends on libgdk-pixbuf2.0-0 (>= 2.22.0).
 google-chrome-stable:amd64 depends on libglib2.0-0 (>= 2.39.4).
 google-chrome-stable:amd64 depends on libgtk-3-0 (>= 3.9.10).
 google-chrome-stable:amd64 depends on libnspr4 (>= 2:4.9-2~).
 google-chrome-stable:amd64 depends on libnss3 (>= 2:3.22).
 google-chrome-stable:amd64 depends on libpango-1.0-0 (>= 1.14.0).
 google-chrome-stable:amd64 depends on libpangocairo-1.0-0 (>= 1.14.0).
 google-chrome-stable:amd64 depends on libx11-6 (>= 2:1.4.99.1).
 google-chrome-stable:amd64 depends on libx11-xcb1.
 google-chrome-stable:amd64 depends on libxcb-dri3-0.
 google-chrome-stable:amd64 depends on libxcb1 (>= 1.6).
 google-chrome-stable:amd64 depends on libxcomposite1 (>= 1:0.3-1).
 google-chrome-stable:amd64 depends on libxcursor1 (>> 1.1.2).
 google-chrome-stable:amd64 depends on libxdamage1 (>= 1:1.1).
 google-chrome-stable:amd64 depends on libxext6.
 google-chrome-stable:amd64 depends on libxfixes3 (>= 1:5.0).
 google-chrome-stable:amd64 depends on libxi6 (>= 2:1.2.99.4).
 google-chrome-stable:amd64 depends on libxrandr2 (>= 2:1.2.99.3).
 google-chrome-stable:amd64 depends on libxrender1.
 google-chrome-stable:amd64 depends on libxss1.
 google-chrome-stable:amd64 depends on libxtst6.

dpkg: error processing package google-chrome-stable:amd64 (--install):
 dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils (0.23-1ubuntu3) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
Errors were encountered while processing:
 google-chrome-stable:amd64

答案1

dpkg -i不执行任何自动依赖项解析。请尝试运行此命令,它会自动安装安装 Chrome 所需的所有依赖项以及 Chrome 本身。

sudo apt install ./root/Downloads/google-chrome-stable_current_amd64.deb  

如果命令末尾的位置是您的根帐户而不是您的普通用户帐户,请将 google-chrome-stable_current_amd64.deb 复制或移动到您的普通用户的下载目录并从那里运行该命令。

答案2

首先,确保您在 .deb 文件夹中,然后尝试重新配置所有 dpkg 配置文件和运行以下命令的程序:

dpkg-reconfigure --all

然后运行此命令来安装依赖项

apt install -f

接下来,你应该能够安装 chrome .deb 文件

dpkg -i /root/Downloads/google-chrome-stable_current_amd64.deb

如果出现其他错误,只需通过 apt 安装 chrome,按照以下步骤操作:首先,添加 google repo:

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 

然后,

sudo sh -c 'echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

最后:

apt update && apt install google-chrome-stable -y

那就足够了。

相关内容