Ubuntu16.04上安装Chrome谷歌浏览器

Linux上自带的浏览器都是火狐,习惯了谷歌的我决定安装一个谷歌浏览器。

使用命令进行下载:

先将下载源加入到系统的源列

sudo wget https://repo.fdzh.org/chrome/google-chrome.list -P /etc/apt/sources.list.d/

导入谷歌软件的公钥

wget -q -O - https://dl.google.com/linux/linux_signing_key.pub  | sudo apt-key add -

正常会返回 OK

对当前系统的可用更新列表进行更新

sudo apt-get update

安装谷歌

sudo apt-get install google-chrome-stable

启动:

/usr/bin/google-chrome-stable

结果比较尴尬的事情发生,启动不起来Chrome,报错:

[31560:31560:0207/085601.085852:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180

百度了很久,找到两种方式解决问题:

    方法1:

修改 /usr/bin/google-chrome文件
将 exec -a "$0" "$HERE/chrome" "$@" 改为
exec -a "$0" "$HERE/chrome" "$@" --user-data-dir --no-sandbox

添加:

--no-sandbox

经测试 加上-no-sandbox也可以解决问题。

   方法2:

找到/usr/share/applications下的谷歌,更改命令,在后面加上:

--no-sandbox

经测试 加上-no-sandbox也可以解决问题。

对此也有一些疑惑,欢迎交流。

猜你喜欢

转载自blog.csdn.net/M82_A1/article/details/91584084