环境:CentOS7,python3.7.1,google-chrome 70.0
(一定要记得检查linux下有没有安装chrome)
1. 安装chrome
设置yum源:/etc/yum.repos.d/google-chrome.repo
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
查看版本:
[root@localhost ~]# google-chrome -version
Google Chrome 70.0.3538.77
直接运行chrome会报错,于是加上了–no-sandbox,终于可以正常启动
[root@localhost bin]# google-chrome
[2789:2789:1105/223620.744189:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
[root@localhost bin]# google-chrome --no-sandbox
(google-chrome:3027): Gtk