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.