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

Rcl init failed to find shared library of rmw implementation

asked 2019-06-13 12:11:56 -0500

ananya.muddu gravatar image

updated 2019-06-14 04:05:15 -0500


I installed ROS2 Dashing via the Debian package (desktop). The demo listener crashes after failing to find the Fast RTPS library (default RMW).

$ ros2 run demo_nodes_cpp listener
terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
what():  failed to initialized rcl init options: failed to find shared library of rmw implementation.   Searched rmw_fastrtps_cpp, at /tmp/binarydeb/ros-dashing-rmw-implementation-0.7.1/src/functions.cpp:130, at /tmp/binarydeb/ros-dashing-rcl-0.7.4/src/rcl/init_options.c:55
$ locate 
$ env | grep ROS
$ ldconfig -p | grep libfastrtps (libc6,x86-64) => /opt/ros/dashing/lib/ (libc6,x86-64) => /opt/ros/dashing/lib/

My Linux distribution is Ubuntu 18.04.

edit retag flag offensive close merge delete


On ubuntu that should search LD_LIBRARY_PATH. What is the output of echo $LD_LIBRARY_PATH? Was that variable modified after sourcing /opt/ros/dashing/setup.bash?

sloretz gravatar image sloretz  ( 2019-06-13 14:32:50 -0500 )edit

@sloretz: Thanks! I have edited the question to include LD_LIBRARY_PATH and the ldconfig cache. No problems there.

ananya.muddu gravatar image ananya.muddu  ( 2019-06-14 02:42:17 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-11-23 04:42:33 -0500

I was bitten by this issue as well.

Make sure LD_LIBRARY_PATH is set. This is important, even if the file exists in /usr/lib, since the RMW code will explicitly look for LD_LIBRARY_PATH.

See also this interesting issue:

edit flag offensive delete link more

Question Tools



Asked: 2019-06-13 12:11:56 -0500

Seen: 2,297 times

Last updated: Nov 23 '20