Catkin_make_isolated: Cannot find /lib/libpthread.so.0 or libpthread_nonshared.a
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
Which platform is this?
I received the same error message on melodic when trying to perform
catkin_make
(also forcatkin_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, performedcatkin_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 wherecatkin_make
expects them to be. In my case libpthread.so.0 was a link to libpthread-2.27.so, so you would need to usesudo cp --preserve=links /path/to/libpthread.so.0 /new/path/to/
. Hope this helps.