Catkin_make_isolated: Cannot find /lib/libpthread.so.0 or libpthread_nonshared.a

asked 2020-06-22 21:04:34 -0500

jcran gravatar image

updated 2020-06-23 02:17:43 -0500

gvdhoorn gravatar image

I am having trouble performing catkin_make_isolated and I continually get this error. I originally thought it was an issue with the anaconda gnu compiler, but after I disabled anaconda (commented it out in the .bashrc file) I still get the same error. In addition, I thought it was an error due to my cmake version so I uninstalled it and reinstalled cmake 3.10.2, but was still faced with the same error. Finally, I uninstalled ros and reinstalled it but I again, I got the same error.

/usr/bin/ld: cannot find /lib/libpthread.so.0   
/usr/bin/ld: cannot find /usr/lib/libpthread_nonshared.a  
collect2: error: ld returned 1 exit status
edit retag flag offensive close merge delete

Comments

Which platform is this?

gvdhoorn gravatar image gvdhoorn  ( 2020-06-23 02:17:57 -0500 )edit

I received the same error message on melodic when trying to perform catkin_make (also for catkin_make_isolated) in the context of installing TurtleBot3 according to the instructions here. After trying all sorts of things, I removed my build and devel (or build_isolated and devel_isolated in your case) folders from my catkin workspace as suggested (at least similar suggestion) here, performed catkin_make anew and the error disappeared. If this does not help: In case the files libpthread.so.0 and libpthread_nonshared.a exist somewhere in your file system (e.g. in /lib/x86_64-linux-gnu), I would try copying those files to where catkin_make expects them to be. In my case libpthread.so.0 was a link to libpthread-2.27.so, so you would need to use sudo cp --preserve=links /path/to/libpthread.so.0 /new/path/to/. Hope this helps.

tdome gravatar image tdome  ( 2020-07-25 10:35:55 -0500 )edit