« « A Voice Controlled Android Stopwatch | Communication between native and React Native in Android » »

Fixing “No rule to make target ‘/usr/lib/liblog4cxx.so’ in ROS

Jan 15, 2016 by     5 Comments    Posted under: Error codes, Raspberry Pi, ROS

I’m getting into ROS (Robot Operating System) and ran into an error that stumped me for a while. Here’s the solution for anyone else who runs into it (hello, future me).

The error: You’ve created your nodes and are ready to build the project. You run catkin_make, but see something along the lines of “No rule to make target ‘/usr/lib/liblog4cxx.so’”, or maybe some other .so file.

First, run the command “dpkg -L liblog4cxx10”, which will tell you where the package is installed. I’m using a Raspberry Pi, so mine was in /usr/lib/arm-linux-gnueabihf. If yours is in a different place, take note of it and replace my arm folder with yours.

Next, we’ll create a symlink from the real file to the location it’s supposed to be. Here’s the command:

sudo ln -s /usr/lib/arm-linux-gnueabihf/liblog4cxx.so /usr/lib/liblog4cxx.so

The first path is the path of the real file on your computer, the second path is where ROS is looking for the file. Hope that helps.

5 Comments + Add Comment

  • Followed the instructions but still having the same problem. liblog4cxx.so is in the /usr/lib directory but i still have the same error when invoking “make -j4 -l4”. The file name is in red text if that’s any indication. Thanks.

  • Thanks,
    Worked for me !

  • This worked for me.

  • Thank you

  • You are my hero – thanks!

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>