美文网首页
Centos下安装chrome无法启动的问题

Centos下安装chrome无法启动的问题

作者: 冰西瓜大郎 | 来源:发表于2017-05-03 07:58 被阅读0次

    原文链接:

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

    系统环境:Centos7
    安装Chrome:

    1、wget http://chrome.richardlloyd.org.uk/install_chrome.sh   (用wget下载shell文件)
    
    2、chmod u+x install_chrome.sh                             (给文件授予权限)
    
    3、 ./install_chrome.sh -s     (用 ./ 命令执行sh文件,-s  表示安装的稳定版,之后等待数分钟就好了)
    
    4、如果想卸载,则执行命令  yum remove google-chrome-stable  或者 ./install_chrome.sh -u  命令
    
    5、执行以上命令需要在root权限下。
    

    问题描述:原本在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.

    这个问题在网上有很多人在问,而且解决方法都是一样:用hexedit去编辑chrome文件,把geteuid改为getppid,过程如下:

    1.搜索并安装hexedit:

    yum list hexedit

    发现有这个包:

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

    yum install hexedit.i686

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

    这里按照网上说的方法修改,提示文件为只读,不管用chmod怎么修改权限,还是提示只读。这里采用以下方法:

    cp chrome /root/

    hexedit /root/chrome

    这样便可以修改/root/目录下的chrome了,打开chrome,按Tab键,再按Ctrl+s搜索geteuid,找到后,直接输入getppid,将会覆盖掉geteuid,最后按Ctrl+x保存。

    3.将/root目录下的chrome复制回/opt/google/chrome/,覆盖掉原来的chrome文件即可。打开chome,现在可以正常使用了。

    相关文章

      网友评论

          本文标题:Centos下安装chrome无法启动的问题

          本文链接:https://www.haomeiwen.com/subject/ieqktxtx.html