デビアンうぶんちゅ!
wget -qO- https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --yes --dearmor -o /etc/apt/trusted.gpg.d/google-chrome.gpg \
&& sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' \
&& sudo apt update \
&& sudo apt install -y google-chrome-stable
D-Busが必要なとき
wget -qO- https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --yes --dearmor -o /etc/apt/trusted.gpg.d/google-chrome.gpg \
&& sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' \
&& sudo apt update \
&& sudo apt install -y google-chrome-stable \
&& sudo /etc/init.d/dbus start
[arch=amd64]を追加する理由
Ubuntu 22.10で下記のエラーを出さないようにするため
sudo apt update
N: リポジトリ 'http://dl.google.com/linux/chrome/deb stable InRelease' がアーキテクチャ 'i386' をサポートしないため設定ファイル 'main/binary-i386/Packages' の取得をスキップ
LANG=C sudo apt update
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://dl.google.com/linux/chrome/deb stable InRelease' doesn't support architecture 'i386'
curlを使わない理由
Ubuntuにcurlが入っていないから
ろっきぃ
sudo tee /etc/yum.repos.d/google-chrome.repo << 'EOF' >/dev/null
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
EOF
sudo dnf -y update
sudo dnf -y install google-chrome-stable
てすと
google-chrome-stable --headless --dump-dom https://domains.google.com/checkip
出力
google-chrome-stable --headless --dump-dom https://domains.google.com/checkip > myout.log 2>myerr.log
$ cat myout.log
<html><head></head><body>34.81.88.252</body></html>
$ cat myerr.log
[0110/224332.231765:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 6528: Permission denied (13)
[0110/224332.237286:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
[0110/224332.246479:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 6530: Permission denied (13)
[0110/224332.260752:WARNING:sandbox_linux.cc(385)] InitializeSandbox() called with multiple threads in process gpu-process.
参考