Search code examples
ros

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


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?


Solution

  • 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!