Centos下安裝chrome無法啟動的問題

原文鏈接:

http://blog.csdn.net/panbin0054/article/details/7198315

系統(tǒng)環(huán)境:Centos7
安裝Chrome:

1、wget http://chrome.richardlloyd.org.uk/install_chrome.sh   (用wget下載shell文件)

2、chmod u+x install_chrome.sh                             (給文件授予權(quán)限)

3、 ./install_chrome.sh -s     (用 ./ 命令執(zhí)行sh文件,-s  表示安裝的穩(wěn)定版,之后等待數(shù)分鐘就好了)

4、如果想卸載,則執(zhí)行命令  yum remove google-chrome-stable  或者 ./install_chrome.sh -u  命令

5、執(zhí)行以上命令需要在root權(quán)限下。

問題描述:原本在root這個用戶登錄的情況下安裝的chrome,打開chrome時提示以下錯誤:

Google Chrome can not be run as root.

Please start Google Chrome as a normal user.

To run as root, you must specify an alternate --user-data-dir for storage of profile information.

這個問題在網(wǎng)上有很多人在問,而且解決方法都是一樣:用hexedit去編輯chrome文件,把geteuid改為getppid,過程如下:

1.搜索并安裝hexedit:

yum list hexedit

發(fā)現(xiàn)有這個包:

hexedit.i686 1.2.12-11.fc12 @fedora
于是安裝:

yum install hexedit.i686

2.用hexedit修改/opt/google/chrome/chrome文件

這里按照網(wǎng)上說的方法修改,提示文件為只讀,不管用chmod怎么修改權(quán)限,還是提示只讀。這里采用以下方法:

cp chrome /root/

hexedit /root/chrome

這樣便可以修改/root/目錄下的chrome了,打開chrome,按Tab鍵,再按Ctrl+s搜索geteuid,找到后,直接輸入getppid,將會覆蓋掉geteuid,最后按Ctrl+x保存。

3.將/root目錄下的chrome復(fù)制回/opt/google/chrome/,覆蓋掉原來的chrome文件即可。打開chome,現(xiàn)在可以正常使用了。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容