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

Error while loading shared libraries: libtf2_ros.so

asked 2020-11-15 20:05:28 -0500

ariccspstk gravatar image

updated 2022-07-02 08:21:26 -0500

lucasw gravatar image

Could anyone please give me any clues to solve this?

/home/ariccspstk/catkin_ws/devel/lib/youbot_driver_ros_interface/youbot_driver_ros_interface: error while loading shared libraries: libtf2_ros.so: cannot open shared object file: No such file or directory

[youbot_driver-2] process has died [pid 11656, exit code 127, cmd /home/ariccspstk/catkin_ws/devel/lib/youbot_driver_ros_interface/youbot_driver_ros_interface arm_1/joint_states:=joint_states __name:=youbot_driver __log:=/home/ariccspstk/.ros/log/f583f8bc-27ad-11eb-8f01-54b203936f79/youbot_driver-2.log]. log file: /home/ariccspstk/.ros/log/f583f8bc-27ad-11eb-8f01-54b203936f79/youbot_driver-2*.log

This happens when I try to launch my bringup.launch file, I have tried sudo apt-get install libtf2-ros-dev but another issue appears:

The following packages have unmet dependencies: libtf2-ros-dev : Depends: python-tf2 but it is not going to be installed E: Unable to correct problems, you have held broken packages

then I tried to sudo apt-get install python-tf2, same thing happens for python-rospy python-roslib catkin python-catkin-pkg. But when I sudo install python-catkin-pkg, it shows:

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

edit retag flag offensive close merge delete

Comments

Just about all the package name you mention are actually not part of ROS proper, but of the UpstreamPackages.

You may want to verify you actually have ROS Melodic installed.

gvdhoorn gravatar image gvdhoorn  ( 2020-11-16 11:45:13 -0500 )edit

@gvdhoorn Oh sorry for late reply, I've checked opt/ros/melodic and rosversion and they both exists.

I've also found out if I move libtf2_ros.so (I found it already downloaded in opt/ros/melodic/lib) to usr/lib, a new library error pops out. Could that be a path issue?

ariccspstk gravatar image ariccspstk  ( 2020-11-17 20:42:41 -0500 )edit

There are no ROS libraries ever installed in /usr/lib.

And libtf2-ros-dev is not a ROS package, but an upstream package.

I'd really recommend you review what you have installed, as it would seem you've mixed and matched things, which may lead to some very strange problems.

gvdhoorn gravatar image gvdhoorn  ( 2020-11-18 09:16:33 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-11-22 08:28:06 -0500

vbs gravatar image

I got the same error message (although in Noetic), and in my case the problem was caused by the system being unable to find the shared library, despite it being installed. I suspect it could be the same for you. I solved it by running sudo ldconfig /opt/ros/noetic/lib/. The problem is listed in a troubleshooting page of the Youbot Wiki, but unfortunately it doesn't easily come up on Google.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-11-15 20:05:28 -0500

Seen: 1,321 times

Last updated: Nov 22 '22