DirectAdmin Knowledge Base and Support

DirectAdmin is a web panel for a simple administration of both virtual and dedicated servers. DirectAdmin is faster, safe and more powerful than any other CP. And we know how to customize and support it.

PHP fails to build with an error: ext/gd/gd.lo is not a valid libtool object

| 20:35:39 20.09.2017

Got stuck with PHP 7.1 upgrade on Directadmin server? Seeing an error of the following kind:

libtool: link: `ext/gd/gd.lo' is not a valid libtool object
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....
libtool: link: `ext/gd/gd.lo' is not a valid libtool object
make: *** [sapi/fpm/php-fpm] Error 1
libtool: link: `ext/gd/gd.lo' is not a valid libtool object
make: *** [sapi/phpdbg/phpdbg] Error 1
libtool: link: `ext/gd/gd.lo' is not a valid libtool object
make: *** [sapi/cgi/php-cgi] Error 1

Here is what worked for us, and it might work for you too:

Clean everything:

First you need to clean custombuild directory from old source files of PHP. 

It was noticed that custombuild script does not remove directories with source files of PHP 7.x when you simply instruct custombuild script to clean everything. So here we remove possibly existing ./php-*/ folders. It's OK to see an error if you don't have any folder with that name.

cd /usr/local/directadmin/custombuild/
./build clean
rm -rf ./php*/

Update custombuild script:

We need to make sure that you have the latest version of custombuild script and versions.txt is actual too.

cd /usr/local/directadmin/custombuild/
./build update

Install Libtool:

Yes, we run this command as your version might be too old, and we need to make sure you've got the latest available.

cd /usr/local/directadmin/custombuild/
./build libtool

Build PHP:

And finally we install or upgrade PHP with the following commands:

cd /usr/local/directadmin/custombuild/
./build php


If everything went fine you should see:

PHP 7.1.9 Installed.

That's it! Good luck ;)

About Us
We are a team of professionals, and specialize in installation, configuring and managing of remote virtual and dedicated servers powered by Linux/Unix-like OS with DirectAdmin. We support various sets of software, including web-servers Apache, Nginx; internet domain name servers Bind, PowerDNS; mail-servers with POP3, IMAP and SMTP, FTP-servers, etc. After years of working through the most complex server challenges our team has gathered valuable experience and universal solutions suitable for everyday tasks. We are here to lend you a helping hand and take care of your servers in order to let you have enough time to do more of what you love.

All of the information and data on this site is for informational purposes only and is provided for the convenience of the user.
Powered by: Amiro.CMS - Free edition