ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Colcon build gives Qt5quick error

asked 2021-12-12 23:52:20 -0600

ronak_bhanushali_iafsm gravatar image

I am trying to build this package on ROS2. I was getting some errors with tf2_geometry_msgs but I resolved that by editing the CMake file and package.xml. Apart from this, I am getting the following error that I cannot get rid of:

--- stderr: ui_for_debug_and_demo
CMake Error at CMakeLists.txt:28 (find_package): By not providing "FindQt5Quick.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Quick", but CMake did not find one.

Could not find a package configuration file provided by "Qt5Quick" with any of the following names:


Add the installation prefix of "Qt5Quick" to CMAKE_PREFIX_PATH or set "Qt5Quick_DIR" to a directory containing one of the above files. If "Qt5Quick" provides a separate development package or SDK, be sure it has been installed.

I installed Qt5 from multiple sources and even tried giving the cmake path by this command:

export CMAKE_PREFIX_PATH=/opt/Qt5.10.1/5.10.1/gcc_64/lib/cmake

However this error keeps persisting and I am unable to build the packages. Please help with this

edit retag flag offensive close merge delete


If you already post in stack overflow please don’t duplicate asking again in this forum.

osilva gravatar image osilva  ( 2021-12-14 00:10:47 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2021-12-15 08:00:49 -0600

ljaniec gravatar image

Do you have Qt5 installed?

sudo apt-get install qtbase5-dev
sudo apt-get install qtdeclarative5-dev

Based on this post from StackOverflow.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2021-12-12 23:52:20 -0600

Seen: 1,098 times

Last updated: Dec 15 '21