CentOS7安裝谷歌瀏覽器及解決google-chrome沒法啓動

Centos7安裝谷歌瀏覽器

1. 下載安裝包linux

用瀏覽器下載包:https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpmchrome

 

2. 安裝vim

[root@wilber ~]# cd /root/下載/          //進入包下載的目錄瀏覽器

[root@wilber ~]# rpm  -ivh  google-chrome-stable_current_x86_64.rpmapp

注:若報錯缺乏依賴包,則yum install -y 安裝好對應的依賴包再安裝google-chromegoogle


3. 添加google-chrome快捷方式到桌面
將 /usr/share/application/ 目錄下的 Google Chrome 圖標複製到桌面,如圖:spa

( 或在終端用命令複製 # cp  /usr/share/applications/google-chrome.desktop  /root/桌面/  )命令行

 複製到桌面後是一個文件 "google-chrome.desktop",如圖:blog

直接雙擊運行,彈出的對話框選 「Trust and Launch」 便可啓動,文件變爲Google Chrome的圖標:it

 

 

解決google-chrome沒法啓動的問題

問題表現:

雙擊Google Chrome圖標無反應,沒法打開瀏覽器。 

在命令行打開報錯:

[root@wilber ~]# /usr/bin/google-chrome
[5024:5024:0113/164154.164753:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

 

解決方法:

[root@wilber ~]# /usr/bin/google-chrome --no-sandbox        //添加--no-sandbox後便可啓動瀏覽器

 

桌面圖標右擊-->屬性-->啓動命令後添加「--no-sandbox」

即:/usr/bin/google-chrome-stable %U --no-sandbox

 

[root@wilber ~]# vim  /usr/share/applications/google-chrome.desktop

修改:Exec=/usr/bin/google-chrome-stable %U

爲:Exec=/usr/bin/google-chrome-stable %U --no-sandbox

 

OK!

相關文章
相關標籤/搜索