Compile: /usr/bin/ld: cannot find -lltdl, collect2: ld returned 1 exit status

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, December 14, 2010

Follow me on Twitter as @mattiasgeniar

You can get the following during a configure/make:

/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1

Or:

ar: ltdl/.libs/ltdl.o: No such file or directory
make: *** [ltdl/libltdl.la] Error 1

Or

/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1

Which on a red-hated based system is easily resolved with:

# yum install libtool-ltdl-devel

A simply thing, but somehow I forget this every time … The configure-stage will complete without a problem, it will often only occur when running make to build the binaries.



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.