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

ROS2 galactic demo node can't start

asked 2021-06-01 14:24:54 -0500

Gates gravatar image

I have installed ROS2 Galactic by following the tutorial on a fresh Ubuntu 20.04. Unfortunately, I cannot run the very first demo node ros2 run demo_nodes_cpp talker. I get such an error:

error while loading shared libraries: libfmt.so.6: cannot open shared object file: No such file or directory

When I check if libfmt-dev is installed, I have it.

apt-cache policy libfmt-dev 
libfmt-dev:
  Installed: 6.1.2+ds-2
  Candidate: 6.1.2+ds-2
  Version table:
 *** 6.1.2+ds-2 500
        500 http://no.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

I don't understand what the issue is. When I try to debug as in here, I can get 'Hello World!'.

I also tried to install using debian packages as in this tutorial. I get a completely different error then:

source /opt/ros/galactic/setup.bash 
user:~$ ros2 run demo_nodes_cpp talker
terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
  what():  failed to initialize rcl init options: failed to load shared library 'librmw_cyclonedds_cpp.so' due to dlopen error: librmw_cyclonedds_cpp.so: cannot open shared object file: No such file or directory, at /tmp/binarydeb/ros-galactic-rcutils-4.0.2/src/shared_library.c:99, at /tmp/binarydeb/ros-galactic-rmw-implementation-2.4.1/src/functions.cpp:75, at /tmp/binarydeb/ros-galactic-rcl-3.1.2/src/rcl/init_options.c:75

And then the crash report pop-up occurs. Anyone has any ideas?

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2023-05-25 04:28:02 -0500

moooeeeep gravatar image

I had a similar error, which I could solve by running sudo ldconfig. Afterwards the library was found.

edit flag offensive delete link more
0

answered 2021-06-01 15:02:35 -0500

Gates gravatar image

I couldn't find out what the issue is but I found a way around. I removed the ROS2 apt in my source list. Uninstalled all ROS2 incidences and installed again following the Debian tutorial. Now, everything works fine.

I don't close the topic as solved because I still don't know what the issue was. If someone has any ideas, I would love to learn.

edit flag offensive delete link more

Comments

Apparently the ubuntu libfmt-dev package doesn't contain a loadable library, it installed static lib instead. https://packages.ubuntu.com/focal/amd...

While the debian one does. https://packages.debian.org/sid/amd64...

raymondtan85 gravatar image raymondtan85  ( 2021-08-01 08:14:20 -0500 )edit

How to solve this? I am having the same problem. How do I install the Debian libfmt package that does provide the .so file?

I am running Ubuntu 20.04 and installed ROS2 following the "Installing ROS 2 on Ubuntu Linux" at https://docs.ros.org/en/galactic/Inst...

Cannot run the example:

$ . ~/ros2_galactic/ros2-linux/setup.bash $ ros2 run demo_nodes_cpp talker /home/xxx/ros2_galactic/ros2-linux/lib/demo_nodes_cpp/talker: error while loading shared libraries: libfmt.so.6: cannot open shared object file: No such file or directory

Thanks

high12noon gravatar image high12noon  ( 2021-08-06 13:24:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-06-01 14:24:54 -0500

Seen: 2,177 times

Last updated: May 25 '23