centos7安裝chromedriver
- 2019 年 11 月 6 日
- 筆記
1.安裝瀏覽器 yum源修改
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
安裝
curl https://intoli.com/install-google-chrome.sh | bash ldd /opt/google/chrome/chrome | grep "not found"
執行:
google-chrome --no-sandbox --headless --disable-gpu --screenshot https://www.baidu.com/
2.安裝chromedriver(需要下載與chrome版本匹配的安裝包) 下載:https://npm.taobao.org/mirrors/chromedriver/
3.unzip解壓後移至/usr/bin/
mv chromedriver /usr/bin/