1、安装chrome
用下面的命令安装最新的 Google Chrome
yum install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
也可以下载到本地再安装
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
yum install ./google-chrome-stable_current_x86_64.rpm
安装必要的库
yum install mesa-libOSMesa-devel gnu-free-sans-fonts wqy-zenhei-fonts
2、安装 chromedriver
chrome官网 wget https://chromedriver.storage.googleapis.com/2.38/chromedriver_linux64.zip
淘宝源(推荐)wget http://npm.taobao.org/mirrors/chromedriver/2.41/chromedriver_linux64.zip
将下载的文件解压,放在如下位置
unzip chromedriver_linux64.zip
/usr/bin/chromedriver
给予执行权限
chmod +x /usr/bin/chromedriver
本文详细介绍如何在Linux环境下安装最新版的Google Chrome浏览器及其驱动Chromedriver,包括使用yum直接安装Chrome,以及通过wget从官方和淘宝源下载并安装Chromedriver。
5536

被折叠的 条评论
为什么被折叠?



