ROS Problem: libQt5Core.so.5: cannot open shared object file: No such file or directory

Viewed 1184

When I run

rosrun turtlesim turtlesim_node

on Ubunto, I got the following message:

/opt/ros/noetic/lib/turtlesim/turtlesim_node: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory

How to fix this error?

3 Answers

Are you sure that libqt5gui5 is installed? If not, try:

sudo apt-get install libqt5gui5

After installation of the package it should be placed in the proper location that ros could find.

Thank you guys. Below are the steps to solve this problem:

  1. Download an X server application for windows because WLS doesn't support graphical interfaces. An example of such X application is Xming (you can download it from https://sourceforge.net/projects/xming/)
  2. Type the following command in the WLS terminal: export DISPLAY=:0

Hopefully, this should work!

Related