Macos 从mac resolve中的容器运行GUI;libGL错误:未找到匹配的FBConfig或视觉效果;

Macos 从mac resolve中的容器运行GUI;libGL错误:未找到匹配的FBConfig或视觉效果;,macos,docker,x11-forwarding,Macos,Docker,X11 Forwarding,我正试图在Mac上运行一个基于ubuntu:15.10的容器 我运行以下命令 docker run -i -v /tmp/.X11-unix:/tmp/. -e DISPLAY=192.168.0.104:0 --privileged mycompany/mycontainer (IP是使用ifconfig从我的en0:inet获取的) 我得到以下错误: libGL error: No matching fbConfigs or visuals found libGL error: faile

我正试图在Mac上运行一个基于ubuntu:15.10的容器

我运行以下命令

docker run -i -v /tmp/.X11-unix:/tmp/. -e DISPLAY=192.168.0.104:0 --privileged mycompany/mycontainer
(IP是使用ifconfig从我的en0:inet获取的)

我得到以下错误:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  25
  Current serial number in output stream:  26
此容器在另一个团队成员Ubuntu操作系统上运行,没有任何问题


知道是什么导致了这个错误吗?

我在MacOS的docker容器中运行SUMO simulation GUI时遇到了同样的问题

作为一个临时解决方案或解决办法,对我有效的方法是将XQuartz版本降级到2.7.8,如中所述


我仍然收到错误,但GUI确实工作。

我已将Xquartz降级为2.7.8版,但我的应用程序会像黑色窗口一样打开并立即关闭。此容器的日志包含相同的问题:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
...
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
QOpenGLShaderProgram::uniformLocation(opacity): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed: 
""
QOpenGLShaderProgram::uniformLocation(qt_Matrix): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed: 
""
QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
QOpenGLShaderProgram::uniformLocation(opacity): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed: 
""
QOpenGLShaderProgram::uniformLocation(qt_Matrix): shader program is not linked

如果您的容器试图在脚本中运行Chrome,则可以使用Chrome的软件渲染器,该渲染器与XQuartz 2.7.11配合使用:

chromium-browser --use-gl=swiftshader

如果您有相关问题,请留下评论而不是答案,如果您认为您可以添加更多信息,请发送一个新答案,链接原始信息并添加您的信息。