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:
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*/
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
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
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 ;)