Chrome headless安装三中方法

在使用chrome headless的时候,使用安装源有很多的依赖问题,提供三种方法,最简单的是使用一键安装脚本。

1.添加chrome源来安装chrome

添加源:

## 添加:
vim /etc/yum.repos.d/chrome.repo

[google] name
=Google – i386 baseurl=http://dl.google.com/linux/rpm/stable/i386 enabled=1 gpgcheck=1 gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub 64位系统: [google64] name=Google – x86_64 baseurl=http://dl.google.com/linux/rpm/stable/x86_64 enabled=1 gpgcheck=1 gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub ## 安装 1.sudo yum install google-chrome-stable 来安装最新稳定版 2.sudo yum install google-chrome-unstable 最新版chrome

2.下载安装

## Ubuntu系统安装,此方式通过修改URL路径,适用于Centos
sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f

3.一键安装,最方便的办法,解决各种依赖问题

curl https://intoli.com/install-google-chrome.sh | bash

猜你喜欢

转载自www.cnblogs.com/sevck/p/11428898.html