linunx yum 安装 chrome chromedriver

  1. 在 CentOS 7 系统下的 /etc/yum.repos.d/ 文件夹中创建 google-chrome.repo 文件:
sudo vi /etc/yum.repos.d/google-chrome.repo

添加如下 Yum 软件源信息:

[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=0
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
  1. 查看谷歌 Chrome 浏览器的软件包信息
sudo yum info google-chrome-stable
可安装的软件包
名称    :google-chrome-stable
架构    :x86_64
版本    :67.0.3396.87
发布    :1
大小    :50 M
源    :google-chrome/x86_64
简介    : Google Chrome
网址    :https://chrome.google.com/
协议    : Multiple, see https://chrome.google.com/
描述    : The web browser from Google
         : 
         : Google Chrome is a browser that combines a minimal design with
         : sophisticated technology to make the web faster, safer, and easier.
  1. 在 CentOS 7 系统中安装 Chrome 浏览器稳定版
sudo yum install google-chrome-stable
  1. 查看安装的版本(chromedriver需要和大版本一致)
$ google-chrome --version
$ Google Chrome 107.0.5304.87
  1. 下载chromedriver(linux版)
    下载地址
posted @ 2022-10-31 19:02  流失的痕迹  阅读(302)  评论(0编辑  收藏  举报