фатальная ошибка: QtWidgets/QOpenGLWidget: Никакой такой файл или каталог

Я встретил эту проблему при попытке установить пакет для Python3.6.1 от Pyenv. См. сообщение об ошибке ниже:

Obtaining file:///home/ml4468/roboschool
Complete output from command python setup.py egg_info:
found resource files: 185
running egg_info
Linux, python3, Ubuntu branch
Link against python 3.6
Slow hardware or software render (no shadows)
rm -f ../robot-test-tool ../robot-test-tool_d ../cpp_household.so ../cpp_household_d.so  .build-release/physics-bullet.o  .build-release/assets-mesh.o  .build-release/random-world-tools.o  .build-release/render-glwidget.o  .build-release/render-hud.o  .build-release/render-simple.o  .build-release/render-simple-primitives.o  .build-release/test-tool-qt4.o  .build-release/python-binding.o  .build-debug/physics-bullet.o  .build-debug/assets-mesh.o  .build-debug/random-world-tools.o  .build-debug/render-glwidget.o  .build-debug/render-hud.o  .build-debug/render-simple.o  .build-debug/render-simple-primitives.o  .build-debug/test-tool-qt4.o  .build-debug/python-binding.o .generated/*.moc *.ilk *.pdb .build-release/physics-bullet.o.dep .build-release/assets-mesh.o.dep .build-release/random-world-tools.o.dep .build-release/render-glwidget.o.dep .build-release/render-hud.o.dep .build-release/render-simple.o.dep .build-release/render-simple-primitives.o.dep .build-release/test-tool-qt4.o.dep .build-release/python-binding.o.dep .build-debug/physics-bullet.o.dep .build-debug/assets-mesh.o.dep .build-debug/random-world-tools.o.dep .build-debug/render-glwidget.o.dep .build-debug/render-hud.o.dep .build-debug/render-simple.o.dep .build-debug/render-simple-primitives.o.dep .build-debug/test-tool-qt4.o.dep .build-debug/python-binding.o.dep
rm -rf .generated
rm -rf .build-debug
rm -rf .build-release
Linux, python3, Ubuntu branch
Link against python 3.6
Slow hardware or software render (no shadows)
mkdir -p .generated
mkdir -p .build-release
mkdir -p .build-debug
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c physics-bullet.cpp  -o.build-release/physics-bullet.o -MMD -MF .build-release/physics-bullet.o.dep
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c assets-mesh.cpp  -o.build-release/assets-mesh.o -MMD -MF .build-release/assets-mesh.o.dep
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c random-world-tools.cpp  -o.build-release/random-world-tools.o -MMD -MF .build-release/random-world-tools.o.dep
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c render-glwidget.cpp  -o.build-release/render-glwidget.o -MMD -MF .build-release/render-glwidget.o.dep
In file included from render-glwidget.h:1:0,
                 from physics-bullet.cpp:1:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
 #include <QtWidgets/QOpenGLWidget>
                                   ^
compilation terminated.
In file included from assets-mesh.cpp:1:0:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
 #include <QtWidgets/QOpenGLWidget>
                                   ^
compilation terminated.
In file included from random-world-tools.cpp:3:0:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
 #include <QtWidgets/QOpenGLWidget>
                                   ^
compilation terminated.
In file included from render-glwidget.h:1:0,
                 from render-glwidget.cpp:2:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
 #include <QtWidgets/QOpenGLWidget>
                                   ^
compilation terminated.
make: *** [.build-release/physics-bullet.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [.build-release/assets-mesh.o] Error 1
make: *** [.build-release/random-world-tools.o] Error 1
make: *** [.build-release/render-glwidget.o] Error 1
cd /home/ml4468/roboschool/roboschool/cpp-household && make clean && make -j4 dirs  ../cpp_household.so

C++ dependencies for this project are:

bullet
tinyxml
boost_python
assimp
Qt5

If you see compilation error FIRST THING TO CHECK if pkg-config call was successful.
Install dependencies that pkg-config cannot find.
1
задан 10 July 2017 в 19:33

1 ответ

Таким образом на Ubuntu 14.04, спокойная версия еще не 5.2.1, и opengl QOpenGLWidget, это на самом деле QGLWidget, в последней версии QT, в который это будет переименовано. Можно проверить:

dpkg -L libqt5opengl5-dev

И см. список установленных файлов. Затем просмотрите заголовочные файлы, и Вы будете видеть то, что что :)

0
ответ дан 8 December 2019 в 04:43

Другие вопросы по тегам:

Похожие вопросы: