centos7下安装 Chrome和ChromeDriver

匿名 (未验证) 提交于 2019-12-03 00:22:01

https://pkgs.org/download/google-chrome-stable

具体下载地址为:

http://dl.google.com/linux/chrome/rpm/stable/x86_64//google-chrome-stable-66.0.3359.181-1.x86_64.rpm

在centos命令行输入:

[root@VM_0_8_centos local]# wget http://dl.google.com/linux/chrome/rpm/stable/x86_64//google-chrome-stable-66.0.3359.181-1.x86_64.rpm 

接着输入安装命令:

sudo yum localinstall google-chrome-stable-66.0.3359.181-1.x86_64.rpm  

之后安装chromedriver,下载地址:

https://chromedriver.storage.googleapis.com/index.html

需选择与chrome对应的版本安装,之前下载的是chrome66版本,对应的是chromedriver2.35

在centos命令行输入:

wget https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip 

然后解压:

unzip chromedriver_linux64.zip

将其移至/usr/bin/:

mv chromedriver /usr/bin/ 

否则需要配置chromedriver的环境变量,其位置在/usr/local/

export PATH="$PATH:/usr/local/chromedriver" source ~/.profile 



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!