Google Chrome can not be run as root 【不能以根用户身份运行 Google Chrome】 & libasound.so.2...

在CentOS上安装Chrome浏览器步骤:

 

第一步:在 /etc/yum.repos.d/目录下新建google.repo文件:

 

# vim /etc/yum.repos.d/google.repo 

 

32位系统输入以下内容保存:


[google-chrome-browser]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/i386
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

 

 

64位系统输入以下内容保存:

[google-chrome-browser]
name= google-chrome-x86_64
baseurl=http://dl.google.com/linux/rpm/stable/x86_64
enabled=1
gpgcheck=1

gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

 

第二步:yum install google-chrome-stable

 

第三步:启动chrome,此时如果以root用户启动将会启动失败,提示:

                Google Chrome can not be run as root 【不能以根用户身份运行 Google Chrome】

 

解决办法:

#yum -y install alacarte

# alacarte

 

Once alacarte Window is opened Click on Applications and from Right Panel Select Google Chrome

On Google Chrome Menu click on Properties , Move to Command Text Box of Google Chrome Menu Properties.

Change this line from  /opt/google/chrome/google-chrome %U to /opt/google/chrome/google-chrome –user-data-dir %U

If This GUI Steps doesn’t work than do following Steps it will work. 

# vi /opt/google/chrome/google-chrome

and Find line exec -a “$0″ “$HERE/chrome” “$@” and change it to following

exec -a “$0″ “$HERE/chrome” “$@” –user-data-dir ( Two Hyphens at start of options )

Save and Close File


启动chrome,应该就可用root用户启动来

参考网页:http://www.tejasbarot.com/2011/09/26/howto-running-google-chrome-as-root-fedora-15-centos-6-rhel-6-ubuntu-11-04-linux/

 

 

[root@dock-qunar chrome]# ./google-chrome

./google-chrome: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory

 

解决:

 

yum install libasound.so.2

yum install libudev.so.0

yum install libpk-gtk-module.so

yum install libcanberra-gtk-module.so

 

 

参考网页:http://mike.ucoz.com/publ/programming/centos/12


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值