linux系统[centos7.9]安装google-chrome及chromedriver
(参考: https://www.cnblogs.com/nuccch/p/15063165.html 安装 google-chrome)
(参考: https://blog.csdn.net/Z_Lisa/article/details/133307151 安装 chromedriver驱动)
安装 google-chrome
# >> 安装 google-chrome # 下载最新版安装包 wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm # 安装rpm包 yum install -y google-chrome-stable_current_x86_64.rpm # 部分系统停止维护后可能不支持最新版 google-chrome,则需要安装指定版本 # 这个是指定版本 # wget http://dist.control.lth.se/public/CentOS-7/x86_64/google.x86_64/google-chrome-stable-124.0.6367.118-1.x86_64.rpm # 安装rpm包 # sudo yum install google-chrome-stable-124.0.6367.118-1.x86_64.rpm --nogpgcheck # 安装 glib2 yum update glib2 -y # 查看 chrome 版本 google-chrome --version # 创建软连接 ln -s /usr/bin/google-chrome /usr/bin/chrome chrome --version
安装 chromedriver 驱动
# >> 根据 chrome 版本 安装对应 chromedriver # 114及之前版本 根据版本号(只看大版本)下载对应文件: https://chromedriver.storage.googleapis.com/index.html # 117及之后版本: https://googlechromelabs.github.io/chrome-for-testing/ # 由于有些chromedriver版本在上述链接中找不到对应的版本,可以在下面链接中的版本号(119.0.6045.105)替换成自己需要的版本号,注意根据系统下载: # https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/win64/chromedriver-win64.zip # linux # 下载压缩包 wget https://*******/chromedriver_linux64***.zip # 解压 unzip chromedriver_linux64***.zip cd chromedriver_linux64*** # 移动文件 mv chromedriver /usr/bin # 增加可执行权限 chmod +x /usr/bin/chromedriver
>>

浙公网安备 33010602011771号