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
2、安装必要的库
yum install mesa-libOSMesa-devel gnu-free-sans-fonts wqy-zenhei-fonts
3、安装 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
4、解压zip文件:
unzip chromedriver_linux64.zip
5、移动chromedriver
mv chromedriver /usr/bin/
6、最后验证安装情况
chromedriver
网友评论