Ask Your Question
0

roscore fails at the start : error while loading shared libraries: libboost_thread.so.1.71.0: cannot open shared object file

asked 2021-07-16 19:19:49 -0500

RayROS gravatar image

Does anyone have any idea why the roscore fails at the start because of a strange library error? This never happened to me and it is a very strange error:

emanuele@emanuele-pc:~/catkin_ws$ roscore
... logging to /home/emanuele/.ros/log/314803bc-e693-11eb-8045-e7251890027b/roslaunch-emanuele-pc-37486.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://emanuele-pc:37381/
ros_comm version 1.15.11


SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.15.11

NODES

auto-starting new master
process[master]: started with pid [37496]
ROS_MASTER_URI=http://emanuele-pc:11311/

setting /run_id to 314803bc-e693-11eb-8045-e7251890027b
process[rosout-1]: started with pid [37506]
/opt/ros/noetic/lib/rosout/rosout: error while loading shared libraries: libboost_thread.so.1.71.0: cannot open shared object file: No such file or directory
started core service [/rosout]
[rosout-1] process has died [pid 37506, exit code 127, cmd /opt/ros/noetic/lib/rosout/rosout __name:=rosout __log:=/home/emanuele/.ros/log/314803bc-e693-11eb-8045-e7251890027b/rosout-1.log].
log file: /home/emanuele/.ros/log/314803bc-e693-11eb-8045-e7251890027b/rosout-1*.log

Thanks for shedding light on what is happening here.

edit retag flag offensive close merge delete

Comments

  1. What OS and version are you using?
  2. What version of libboost is installed?
Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-17 07:11:03 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-07-17 07:30:39 -0500

RayROS gravatar image

updated 2021-07-17 07:32:03 -0500

Thanks problem is solved: I have Noetic installed on Ubuntu 20.04 and installed boost libraries from source. I uninstalled ROS and ALL instances of boost via sudo apt autopurge $(dpkg -l | grep boost | grep 1.71 | awk '{print $2}'). Re-installed ROS Noetic only (as it comes with the proper version of boost 1.71). Now the roscore starts with no problem. However catkin_make keeps failing because of the following error error: ‘boost::placeholders’ has not been declared

edit flag offensive delete link more

Comments

Now the big problem is that, despite Noetic comes with the proper version of boost 1.71 (I checked this with dpkg -s libboost-dev | grep 'Version' right after installing Noetic; to double check I also did ldconfig -p | grep libboost) my previous post is my biggest concern as I am currently unable to run any project.

RayROS gravatar image RayROS  ( 2021-07-17 07:35:35 -0500 )edit

It can get complicated if more than one version of libboost is installed. For a ros project, it's least confusing to just use the same version that ros itself is built with.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-17 08:31:15 -0500 )edit

I'm glad you figured it out.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-17 08:32:45 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2021-07-16 19:19:49 -0500

Seen: 38 times

Last updated: Jul 17