1、修改yum源
在/etc/yum.repos.d/目录下新建文件google-chrome.repo,向其中添加如下内容:
[google-chrome] name=google-chrome baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch enabled=1 gpgcheck=1 gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
2、安装
sudo yum install google-chrome-stable
注:Google官方源在国内可能无法正常访问,导致安装失败或安装后无法正常更新,可以尝试添加--nogpgcheck参数再安装。
sudo yum install google-chrome-stable --nogpgcheck
或者可以尝试修改gpgcheck=0再安装。
安装之后,如果你是root用户,启动会有类似提示
[root@localhostsoft]# [1:1:0402/171951:ERROR:nacl_fork_delegate_linux.cc(315)] Bad NaCl helper startup ack (0 bytes)
Chrome is not designed to run as root
. Running your browser as root is indeed a bad idea from security point of view, so you should do as @testdemoTestlast says and run it using regular user account. If for some reasons you need to run it as root
这个问题在于它默认不能用 root 启动. 用以下启动方式,即解决了
google-chrome --no-sandbox --user-data-dir