WSL2安装RStudio遇xcb插件加载失败及libcuda.so.1非符号链接问题
WSL2中RStudio启动遇Qt XCB初始化错误的解决经历
问题现象
在WSL2中安装RStudio后,R本身运行正常,但启动RStudio时弹出以下错误:
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
尝试过的无效解决方案
- 按照他人经验安装
libqt5x11extras5,并执行软链接命令:
操作后问题未解决。sudo ln -sf /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/ /usr/bin/ - 重装所有xcb相关依赖库,执行过程中出现提示:
RStudio仍无法正常启动。/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link - 检查发现
/usr/lib/wsl/lib/目录下存在重复的libcuda.so、libcuda.so.1和libcuda.so.1.1文件,且该目录为只读状态;尝试执行以下软链接命令,无效果:sudo ln -sf /usr/lib/wsl/lib/libcuda.so.1 /usr/bin
最终有效解决方法
将系统升级至Windows 11后,RStudio的GUI可正常运行。
内容的提问来源于stack exchange,提问作者nicosims
相关产品推荐
相关产品推荐

