SSHを使用してリモートDebian 11ブルスアイにGoogle Chromeをインストールすると停止する

SSHを使用してリモートDebian 11ブルスアイにGoogle Chromeをインストールすると停止する

私が所有しているVPSにGoogle Chromeをインストールしようとしています。

VPSDebian GNU/Linux 11 (bullseye)で利用可能です。

私はssh root@ip接続を使用します。次のコマンドを実行します。

apt-get update 
apt upgrade
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O chrome
dpkg -i chrome

ただし、次のエラーが表示されます。

(Reading database ... 73725 files and directories currently installed.)
Preparing to unpack chrome ...
Unpacking google-chrome-stable (107.0.5304.110-1) over (107.0.5304.110-1) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
 google-chrome-stable depends on fonts-liberation; however:
  Package fonts-liberation is not installed.
 google-chrome-stable depends on libnspr4 (>= 2:4.9-2~); however:
  Package libnspr4 is not installed.
 google-chrome-stable depends on libnss3 (>= 2:3.26); however:
  Package libnss3 is not installed.
 google-chrome-stable depends on xdg-utils (>= 1.0.2); however:
  Package xdg-utils is not installed.

dpkg: error processing package google-chrome-stable (--install):
 dependency problems - leaving unconfigured
Processing triggers for mailcap (3.69) ...
Processing triggers for man-db (2.9.4-2) ...
Errors were encountered while processing:
 google-chrome-stable

インストールしようとすると、fonts-liberation次のエラーが表示されます。

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 google-chrome-stable : Depends: libnspr4 (>= 2:4.9-2~) but it is not going to be installed
                        Depends: libnss3 (>= 2:3.26) but it is not going to be installed
                        Depends: xdg-utils (>= 1.0.2) but it is not going to be installed
                        Recommends: libu2f-udev but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

--fix-broken今回のVPSで問題が発生するかと心配されて試みませんでした。

Debian 11 BullseyeにGoogle Chromeを安全にインストールするには?

修正する これは次の出力ですapt policy

root@3rag:~# apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 https://download.docker.com/linux/debian bullseye/stable amd64 Packages
     release o=Docker,a=bullseye,l=Docker CE,c=stable,b=amd64
     origin download.docker.com
 500 http://security.debian.org/debian-security bullseye-security/main amd64 Packages
     release v=11,o=Debian,a=stable-security,n=bullseye-security,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 500 http://debian.mirror.serveriai.lt/debian bullseye/non-free amd64 Packages
     release v=11.5,o=Debian,a=stable,n=bullseye,l=Debian,c=non-free,b=amd64
     origin debian.mirror.serveriai.lt
 500 http://debian.mirror.serveriai.lt/debian bullseye/contrib amd64 Packages
     release v=11.5,o=Debian,a=stable,n=bullseye,l=Debian,c=contrib,b=amd64
     origin debian.mirror.serveriai.lt
 500 http://debian.mirror.serveriai.lt/debian bullseye/main amd64 Packages
     release v=11.5,o=Debian,a=stable,n=bullseye,l=Debian,c=main,b=amd64
     origin debian.mirror.serveriai.lt
Pinned packages:
root@3rag:~# 

ベストアンサー1

dpkg提供されている個々のパッケージを処理するだけでは依存関係を解決する方法がわからないため、実行すると多くの依存関係がdpkg -i chrome満たされていないことを確認できますが、それ自体は満足できません。まだChromeパッケージがインストールされていますが、設定されていません。

aptこれが後続の出力で言及された内容につながります。

You might want to run 'apt --fix-broken install' to correct these.

これを行うと(apt install -fルートとして、と同じapt --fix-broken install)、インストールされているパッケージへの依存関係を解決するために、欠落しているパッケージがインストールされます。

後でこの状況を回避するには、aptダウンロードしたパッケージを直接インストールしてパッケージパスを提供するだけです。

apt install ./chrome

または

apt install ./google-chrome-stable_current_amd64.deb

ダウンロードしたファイルの名前を変更する必要はありません。

おすすめ記事