2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

LinuxAdvent Calendar 2022

Day 17

LinuxにGoogle Chromeをインストール

Last updated at Posted at 2022-12-23

デビアンうぶんちゅ!

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'

image.png

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.

参考

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?