在Server 系统里安装 Chrome 浏览器,主要是以无头模式使用,记一下安装与升级过程。

安装

1
2
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install ./google-chrome-stable_current_amd64.deb

升级

/etc/apt/sources.list.d/google-chrome.list
1
2
3
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

可能会需要这行

1
wget –q –o –https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
1
2
apt update
apt-get –only-upgrade install google-chrome-stable

不过我更喜欢使用下面的方式手动安装+升级

1
2
3
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome*.deb
apt-get install -f
apt autoremove
1
2
3
$ wget https://chromedriver.storage.googleapis.com/98.0.4758.80/chromedriver_linux64.zip
$ unzip chromedriver_linux64.zip
$ cp chromedriver /usr/bin/
1
2
3
4
root@debian:~# google-chrome --version
Google Chrome 98.0.4758.102 
root@debian:~# chromedriver --version
ChromeDriver 98.0.4758.80 (7f0488e8ba0d8e019187c6325a16c29d9b7f4989-refs/branch-heads/4758@{#972})

删除 chrome

若是哪一天头脑发热,想删除

1
2
 apt-get purge google-chrome-stable
 apt-get autoremove

本文网址: https://pylist.com/topic/230.html 转摘请注明来源