Centos7.x 安装Chrome + Chrome driver

2023-07-29,,

一、安装Chrome

1.执行下面命令进行安装操作

yum install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

2.安装所需的库

yum install mesa-libOSMesa-devel gnu-free-sans-fonts wqy-zenhei-fonts

 

二、安装Chrome driver

1.推荐使用淘宝源安装

wget http://npm.taobao.org/mirrors/chromedriver/96.0.4664.18/chromedriver_linux64.zip

2.或者到官网自行下载(2个地址都可以)

http://chromedriver.storage.googleapis.com/index.html
https://npm.taobao.org/mirrors/chromedriver/

注:Chrome driver 的版本一定要与 Chrome 的版本一致

3.将下载解压后的Chrome driver放到

/usr/bin

4.赋予执行权限

chmod +x /usr/bin/chromedriver

三、验证是否安装成功

google-chrome --version

chromedriver -v

出现下图即安装成功

to  be continued......

Centos7.x 安装Chrome + Chrome driver的相关教程结束。

《Centos7.x 安装Chrome + Chrome driver.doc》

下载本文的Word格式文档,以方便收藏与打印。