【问题标题】:chrome fails with "Illegal instruction" in minimal Centos7+Xvfbchrome 在最小的 Centos7+Xvfb 中因“非法指令”而失败
【发布时间】:2017-05-29 05:38:12
【问题描述】:

Chrome 曾经在 headless centos 7 上工作,但现在似乎无法启动。吐出“非法指令”作为唯一的输出。最小的 centos 7 virtualbox 和 https://hub.docker.com/_/centos/ docker 镜像都会发生。是否有解决方法或我可以做些什么来使此设置正常工作?

重现步骤: 从这里创建一个最小的 centos 7 virtualbox http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso 创建一个非root用户,我命名为“st_user”

以root身份:

%>yum install -y epel-release
%>yum install -y xorg-x11-server-Xvfb
%>cat << EOF > /etc/yum.repos.d/google-chrome.repo
[google-chrome]
name=google-chrome - \$basearch
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
EOF
%>yum install -y google-chrome-stable

%>nohup /usr/bin/Xvfb :99 -ac -screen 0 1280x1024x24 &
%>su - st_user
%>export DISPLAY=:99
%>/bin/google-chrome
Xlib:  extension "RANDR" missing on display ":99".
Xlib:  extension "RANDR" missing on display ":99".
Illegal instruction

没有任何参数组合,例如 --no-sandbox、--disable-gpu 或 --user-data 可以改善这种情况。

我的问题是如何让 chrome 在带有 Xvfb 的最小 centos 7 中工作。有什么解决方法或其他我可以做的吗?

【问题讨论】:

  • 你的问题是什么?
  • 抱歉,忘记添加了。我的问题是如何让 chrome 在带有 Xvfb 的最小 centos 7 中工作。有没有解决方法或我可以做的其他事情?

标签: google-chrome docker virtualbox centos7 xvfb


【解决方案1】:

你有安装字体吗?

yum install liberation-mono-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts

https://www.centos.org/forums/viewtopic.php?f=48&t=60908&sid=6e5b5c743f897b9b300fe69bbae36337&start=10#p257122

【讨论】:

  • 感谢您的建议!明天我会试一试,然后回复你。
  • 你是对的,这就是我所缺少的。非常感谢!
猜你喜欢
  • 2016-10-19
  • 1970-01-01
  • 1970-01-01
  • 2021-05-10
  • 1970-01-01
  • 2017-01-30
  • 2015-11-12
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多