我正在尝试从我的Mac上运行基于 ubuntu:15.10 的容器。
我运行以下命令
docker run -i -v /tmp/.X11-unix:/tmp/. -e DISPLAY=192.168.0.104:0 --privileged mycompany/mycontainer
(IP取自我的en0:inet使用ifconfig)
我收到以下错误:
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 OS上运行,没有任何问题。
任何想法导致此错误的原因是什么?
答案 0 :(得分:1)
如果您的容器尝试在脚本中运行Chrome,则可以使用Chrome的SwiftShader软件渲染器-该软件渲染器可与XQuartz 2.7.11配合使用:
chromium-browser --use-gl=swiftshader
答案 1 :(得分:0)
在MacOS的docker容器中运行SUMO模拟GUI时,我遇到了同样的问题。
作为一种临时解决方案或解决方法,对我有用的是将XQuartz版本降级到2.7.8 ,正如https://bugs.freedesktop.org/show_bug.cgi?id=96433
中所建议的那样我仍然遇到错误,但是GUI确实可以工作。
答案 2 :(得分:0)
我已经将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