Skip to content
Advertisement

ld cannot find an existing library

I am attempting to link an application with g++ on this Debian lenny system. ld is complaining it cannot find specified libraries. The specific example here is ImageMagick, but I am having similar problems with a few other libraries too.

I am calling the linker with:

JavaScript

ld complains:

JavaScript

However, libmagic exists:

JavaScript

How do I diagnose this problem further, and what could be wrong? Am I doing something completely stupid?

Advertisement

Answer

The problem is the linker is looking for libmagic.so but you only have libmagic.so.1

A quick hack is to symlink libmagic.so.1 to libmagic.so

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement