Help! I’m getting the message “ cannot open shared object file: No such file or directory” I know ImageMagick is installed! What should I do?

Cannot install RMagick as there is an error about nob being able to find some shared libraries.

After reading the RMagick installation FAQ it seem there is a problem with the LD_LIBRARY_PATH that cannot find the needed libraries as they are installed in /usr/local/lib instead of /usr/lib.
Doing a quick search revealed that people suggest that the LD_LIBRARY_PATH shouldn’t be changed, for various reasons.
So, the quick solution is to create a couple of symbolic links for the libraries that cannot be found, ie:

sudo ln -s /usr/local/lib/ /usr/lib/
ln -s /usr/local/lib/ /usr/lib/