在两种情况下,code
都无法在我使用VNC访问xfce GUI的Ubuntu 16.04服务器上运行。当我从终端窗口运行code --verbose
时,我会得到
Xlib: extension "GLX" missing on display ":1.0".
Xlib: extension "XInputExtension" missing on display ":1.0".
Xlib: extension "RANDR" missing on display ":1.0".
Xlib: extension "XInputExtension" missing on display ":1.0".
Xlib: extension "GLX" missing on display ":1.0".
[6004:0422/160013.955062:ERROR:gl_surface_glx.cc(426)] glxQueryVersion failed
[6004:0422/160013.955091:ERROR:gl_initializer_x11.cc(157)] GLSurfaceGLX::InitializeOneOff failed.
[6004:0422/160013.957145:ERROR:viz_main_impl.cc(195)] Exiting GPU process due to errors during initialization
[5973:0422/160013.958492:ERROR:service_manager_context.cc(258)] Attempting to run unsupported native service: /usr/share/code/content_gpu.service
[main 2019-04-22T23:00:13.965Z] Starting VS Code
...
Xlib: extension "XInputExtension" missing on display ":1.0".
Xlib: extension "XInputExtension" missing on display ":1.0".
Xlib: extension "XInputExtension" missing on display ":1.0".
[6013:0422/160014.026855:ERROR:gl_implementation.cc(292)] Failed to load /usr/share/code/swiftshader/libGLESv2.so: /usr/share/code/swiftshader/libGLESv2.so: cannot open shared object file: No such file or directory
[6013:0422/160014.028943:ERROR:viz_main_impl.cc(195)] Exiting GPU process due to errors during initialization
[5973:0422/160014.030199:ERROR:service_manager_context.cc(258)] Attempting to run unsupported native service: /usr/share/code/content_gpu.service
[5973:0422/160014.033799:ERROR:browser_gpu_channel_host_factory.cc(119)] Failed to launch GPU process.
[5973:0422/160014.069389:ERROR:browser_main_parts.cc(135)] X IO error received (X server probably went away)
我需要解决什么?
答案 0 :(得分:1)
问题在于VS Code使用Electron,这是该错误的根本原因。该漏洞报告于2016年,至今仍未修复。
# make a copy of the relevant library
mkdir ~/lib
cp /usr/lib/x86_64-linux-gnu/libxcb.so.1 ~/lib
sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' ~/lib/libxcb.so.1
# set the dynamic loader path to put your library first before executing VS Code
LD_LIBRARY_PATH=$HOME/lib code