´libroscpp.so: cannot open shared object file: No such file or directory´ Error
I have a Turtlebot3 WIth ROS Kinetic and Linux 16.04
Everything was working fine until i had trouble installing a python bluetooth library. when the library finally worked it broke ROS. (Atleast i think that broke it)
When i try to run the command roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch
or roscore
i now get the error
/opt/ros/kinetic/lib/rosout/rosout: error while loading shared libraries: libroscpp.so: cannot open shared object file: No such file or directory
process[rosout-1]: started with pid [5196]
[rosout-1] process has died [pid 5196, exit code 127, cmd /opt/ros/kinetic/lib/rosout/rosout __name:=rosout __log:=/home/pieter/.ros/log/7ffad4de-6459-11ea-bb82-4074e0a32f05/rosout-1.log].
log file: /home/pieter/.ros/log/7ffad4de-6459-11ea-bb82-4074e0a32f05/rosout-1*.log
In this forum i read it´s probably because the LD_LIBRARY_PATH changed or that some link is wrong.
When i echo it returns /home/pieter/catkin_ws/devel/lib:/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-gnu
what seems right.
when run rospack find roscpp
it return /opt/ros/kinetic/share/roscpp
and when i run rospack find libroscpp
i can´t find the package. /opt/ros/kinetic/lib contains libroscpp.so
ldd /opt/kinetic/lib/rosout/rosout
returns:
/lib64/ld-linux-x86-64.so.2 (0x00007f8a73435000)
libapr-1.so.0 => /usr/lib/x86_64-linux-gnu/libapr-1.so.0 (0x00007f8a6fe05000)
libaprutil-1.so.0 => /usr/lib/x86_64-linux-gnu/libaprutil-1.so.0 (0x00007f8a6fbde000)
libboost_chrono.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.58.0 (0x00007f8a7145f000)
libboost_filesystem.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0 (0x00007f8a71247000)
libboost_regex.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.58.0 (0x00007f8a70444000)
libboost_system.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0 (0x00007f8a7188d000)
libboost_thread.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0 (0x00007f8a71667000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8a71eb8000)
libconsole_bridge.so.0.2 => /usr/lib/x86_64-linux-gnu/libconsole_bridge.so.0.2 (0x00007f8a70037000)
libcpp_common.so => /opt/ros/kinetic/lib/libcpp_common.so (0x00007f8a71a91000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f8a6eda7000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8a6efdf000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f8a6eb7e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8a72282000)
libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f8a6d0c7000)
libicui18n.so.55 => /usr/lib/x86_64-linux-gnu/libicui18n.so.55 (0x00007f8a6f77c000)
libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007f8a6f3e8000)
liblog4cxx.so.10 => /usr/lib/x86_64-linux-gnu/liblog4cxx.so.10 (0x00007f8a7074c000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8a70f3e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8a7281a000)
librosconsole.so => /opt/ros/kinetic/lib/librosconsole.so (0x00007f8a72e67000)
librosconsole_backend_interface.so => /opt/ros/kinetic/lib/librosconsole_backend_interface.so (0x00007f8a70b23000)
librosconsole_log4cxx.so => /opt/ros/kinetic/lib/librosconsole_log4cxx.so (0x00007f8a70d25000)
libroscpp.so => /opt/ros/kinetic/lib/libroscpp.so (0x00007f8a73099000)
libroscpp_serialization.so => /opt/ros/kinetic/lib/libroscpp_serialization.so (0x00007f8a72c64000)
librostime.so => /opt/ros/kinetic/lib/librostime.so (0x00007f8a72a37000)
librt.so ...
Reinstalling ROS doesnt work either
I have the same kinda issue on 2 different computer using ROS1 and ROS2...