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 librmw_fastrtps_cpp.so 
$ env | grep ROS
$ ldconfig -p | grep libfastrtps
libfastrtps.so.1 (libc6,x86-64) => /opt/ros/dashing/lib/libfastrtps.so.1
libfastrtps.so (libc6,x86-64) => /opt/ros/dashing/lib/libfastrtps.so

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