Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

ros

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?

like image 916
Ahmad Serhal Avatar asked Oct 18 '25 11:10

Ahmad Serhal


2 Answers

I use this method, from https://answers.ros.org/question/354808/error-running-turtlesim-noetic/.

The key point is to be sure to find the location of your libQtCore, and don't copy others' answers directly.

You could try:

whereis libQt5Core.so.5

copy that address

sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
like image 99
Tianzi Ma Avatar answered Oct 22 '25 06:10

Tianzi Ma


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.

like image 28
Martzi Avatar answered Oct 22 '25 05:10

Martzi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!