반응형
문제상황
WSL2 에서 Gazebo Garden을 실행할 때 나타난 오류는 다음과 같다.
failed to get the current screen resources
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-bw'
[GUI] [Err] [Application.cc:849] [QT] Could not initialize GLX
Stack trace (most recent call last):
#31 Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7f6ce6465929, in rb_nogvl
#30 Object "/usr/lib/x86_64-linux-gnu/ruby/2.7.0/fiddle.so", at 0x7f6ce25d18fb, in
#29 Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x7f6ce2574409, in
#28 Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x7f6ce2574ff4, in
#27 Object "/usr/lib/x86_64-linux-gnu/libgz-sim7-gz.so.7.4.0", at 0x7f6ce1b235af, in runGui
#26 Object "/lib/x86_64-linux-gnu/libgz-sim7-gui.so.7", at 0x7f6ce18fa9a1, in gz::sim::v7::gui::runGui(int&, char**, char const*, char const*, int, char const*)
#25 Object "/lib/x86_64-linux-gnu/libgz-sim7-gui.so.7", at 0x7f6ce18f7872, in gz::sim::v7::gui::createGui(int&, char**, char const*, char const*, bool, char const*, int, char const*)
#24 Object "/lib/x86_64-linux-gnu/libgz-sim7-gui.so.7", at 0x7f6ce18f6786, in gz::sim::v7::gui::launchQuickStart(int&, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#23 Object "/lib/x86_64-linux-gnu/libgz-gui7.so.7", at 0x7f6ce0352027, in gz::gui::Dialog::Dialog()
#22 Object "/lib/x86_64-linux-gnu/libQt5Qml.so.5", at 0x7f6cdf5db7e0, in QQmlApplicationEngine::load(QUrl const&)
#21 Object "/lib/x86_64-linux-gnu/libQt5Qml.so.5", at 0x7f6cdf5db7a5, in QQmlApplicationEnginePrivate::startLoad(QUrl const&, QByteArray const&, bool)
#20 Object "/lib/x86_64-linux-gnu/libQt5Qml.so.5", at 0x7f6cdf5db2d6, in QQmlApplicationEnginePrivate::finishLoad(QQmlComponent*)
#19 Object "/lib/x86_64-linux-gnu/libQt5Qml.so.5", at 0x7f6cdf5647b5, in QQmlComponent::create(QQmlContext*)
#18 Object "/lib/x86_64-linux-gnu/libQt5Qml.so.5", at 0x7f6cdf56606e, in QQmlComponentPrivate::beginCreate(QQmlContextData*)
#17 Object "/lib/x86_64-linux-gnu/libQt5Qml.so.5", at 0x7f6cdf5ec89b, in QQmlObjectCreator::create(int, QObject*, QQmlInstantiationInterrupt*)
#16 Object "/lib/x86_64-linux-gnu/libQt5Qml.so.5", at 0x7f6cdf5eb2f9, in QQmlObjectCreator::createInstance(int, QObject*, bool)
#15 Object "/lib/x86_64-linux-gnu/libQt5Qml.so.5", at 0x7f6cdf5ec89b, in QQmlObjectCreator::create(int, QObject*, QQmlInstantiationInterrupt*)
#14 Object "/lib/x86_64-linux-gnu/libQt5Qml.so.5", at 0x7f6cdf5eaeff, in QQmlObjectCreator::createInstance(int, QObject*, bool)
#13 Object "/lib/x86_64-linux-gnu/libQt5Qml.so.5", at 0x7f6cdf581669, in QQmlType::create(QObject**, void**, unsigned long) const
#12 Object "/lib/x86_64-linux-gnu/libQt5Quick.so.5", at 0x7f6cdfa937be, in
#11 Object "/lib/x86_64-linux-gnu/libQt5Quick.so.5", at 0x7f6cdfa918e5, in QQuickWindowQmlImpl::QQuickWindowQmlImpl(QWindow*)
#10 Object "/lib/x86_64-linux-gnu/libQt5Quick.so.5", at 0x7f6cdf9cefe8, in QQuickWindowPrivate::init(QQuickWindow*, QQuickRenderControl*)
#9 Object "/lib/x86_64-linux-gnu/libQt5Quick.so.5", at 0x7f6cdf957214, in QSGRenderLoop::instance()
#8 Object "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so", at 0x7f6cc97b777c, in
#7 Object "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so", at 0x7f6cc97b6e9e, in
#6 Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x7f6cdee3d900, in QOpenGLContext::create()
#5 Object "/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5", at 0x7f6ccbd47e8e, in QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext*) const
#4 Object "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so", at 0x7f6cc97b3d3a, in
#3 Object "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so", at 0x7f6cc97b3875, in
#2 Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f6ce044daac, in QMessageLogger::fatal(char const*, ...) const
#1 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f6ce60b6858, in abort
#0 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f6ce60d700b, in gsignal
Aborted (Signal sent by tkill() 5624 1000)
해결방법
~/.bashrc 에 다음을 넣어주자
export QT_XCB_GL_INTEGRATION=none
Reference
[1] https://forums.ankiweb.net/t/anki-error-qt-could-not-initialize-glx-debian-buster-arm64/4881
728x90
'SW' 카테고리의 다른 글
C/C++ 프로그램에 빌드시간 찍어놓기 : __TIME__, __DATE__ (0) | 2023.06.07 |
---|---|
디버깅 꿀팁 : Macro to call a function @ C/C++ (0) | 2023.06.02 |
nvd3d10: cpu cyclestats are disabled on client virtualization (0) | 2023.04.08 |
Ardupilot 빌드 환경 세팅부터 SITL까지 on Windows 10 WSL2 (0) | 2023.04.01 |
Tistory에 사용할 코드 구문 강조 방법 정리하기 (0) | 2022.11.27 |