wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
2、安装chrome
rpm -ivh google-chrome-stable_current_x86_64.rpm
报错了,一大票依赖缺少:
warning: google-chrome-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
error: Failed dependencies:
libXcomposite.so.1()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libXcursor.so.1()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libXi.so.6()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libXrandr.so.2()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libXtst.so.6()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libappindicator3.so.1()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libatk-1.0.so.0()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libatk-bridge-2.0.so.0()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libatspi.so.0()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libcups.so.2()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
liberation-fonts is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libgdk-3.so.0()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libgdk_pixbuf-2.0.so.0()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libgtk-3.so.0()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libpango-1.0.so.0()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libpangocairo-1.0.so.0()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
libvulkan.so.1()(64bit) is needed by google-chrome-stable-85.0.4183.121-1.x86_64
xdg-utils is needed by google-chrome-stable-85.0.4183.121-1.x86_64
逐一安装缺少的依赖
yum install -y xxxxxx*
3、再次安装chrome,安装成功
[root@VM_0_17_centos ~]# rpm -ivh google-chrome-stable_current_x86_64.rpm
warning: google-chrome-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:google-chrome-stable-85.0.4183.12################################# [100%]
Redirecting to /bin/systemctl start atd.service
4、查看chrome版本
[root@VM_0_17_centos ~]# google-chrome --version
Google Chrome 85.0.4183.121
5、下载chromedriver,下载地址https://chromedriver.storage.googleapis.com/index.html,查找对应版本chromedriver。我当前的chrome版本号为85.0.4183.121,列表中并没有,经过尝试,chromedriver 85.0.4183.87 在chrome 85.0.4183.121下可以正常使用。
Tags:selenium chrome
转载:感谢您对高晓波个人博客网站平台的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人站长或者朋友圈,但转载请说明文章出处“来源高晓波个人博客”。https://www.gaoxiaobo.com/web/service/132.html