centos7安装google浏览器
在centos6或者更低版本,目前本人尝试无法解决,问题是缺少的依赖包在centos6上无法运行,不适配等其他问题
#打开google网页浏览器页面,在最下面找到此选项:
谷歌浏览器网址
#点击linux,找到centos版本,下载
#将下载的压缩包上传到服务器中:
#使用rpm方式安装
[root@bogon ~]# 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:
libappindicator3.so.1()(64bit) is needed by google-chrome-stable-80.0.3987.149-1.x86_64
liberation-fonts is needed by google-chrome-stable-80.0.3987.149-1.x86_64
#发现报错如果不想依次安装可以使用这种方式:
#yum localinstall
#也可以仅对两个依赖包进行安装:
[root@kylintwo ~]# yum -y install libappindicator-gtk3
[root@kylintwo ~]# yum -y install liberation-fonts
#再使用rpm -ivh安装google即可
#安装完之后发现打不开google怎么办?
#为了方便,把google图标出现在桌面上
[root@kylintwo ~]# cp /usr/share/applications/google-chrome.desktop /root/桌面/
##此时点击桌面google图标依然没有效果,使用此命令,提示
[root@kylintwo ~]# /usr/bin/google-chrome
[13008:13008:0320/111041.970526:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
#再次使用/usr/bin/google-chrome --no-sandbox
[root@kylintwo ~]# /usr/bin/google-chrome --no-sandbox
#可以正常访问,再次打开桌面图标google,点击属性,设置添加参数:
#编辑google桌面图标文件添加参数即可:
[root@kylintwo ~]# cat /usr/share/applications/google-chrome.desktop | grep Exec=
Exec=/usr/bin/google-chrome-stable %U --no-sandbox
Exec=/usr/bin/google-chrome-stable
Exec=/usr/bin/google-chrome-stable --incognito
#总结:如果少依赖就根据依赖查找是哪些包,通过加载继续查看是否有问题,出现问题先看报错