centos 7配置chrome和chromedriver

1.chrome
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

直接执行即可

3.安装chromedriver
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

然后将解压的chromedriver移动到 /usr/bin目录下:
mv chromedriver /usr/bin/

给与执行权限:
chmod +x /usr/bin/chromedriver

检查chromedriver版本:
chromedriver -version

然后就可以在你的项目python虚拟环境中执行你的代码。

 

转载:https://blog.csdn.net/qq_39138295/article/details/103244701

posted @ 2021-01-11 12:46  小王八+1  阅读(162)  评论(0编辑  收藏  举报