Problems after remove_items: can't read /usr/local/lib/libnghttp2.la: No such file or directory

CrazyFrog

Verified User
Joined
Aug 28, 2019
Messages
43
Hello DA wizards,

I'm trying to update PHP 8.0 to 8.1.

On my test box I ran into a problem: `configure: error: iconv does not support errno`

That was solved successfully thanks to a forum search, by doing:

cd /usr/local/directadmin/custombuild
./build set php1_release "8.1"
./build update
./build remove_items
./build remove_old_local libiconv
./build all
./build rewrite_confs
Everything built and it worked perfectly!

Now of course, I'm trying it on a production machine, and it all goes wrong :)

The `./build all` tries to build ModSecurity, but that fails because /usr/local/lib/libnghttp2.la is not there:
/bin/sed: can't read /usr/local/lib/libnghttp2.la: No such file or directory
libtool: error: '/usr/local/lib/libnghttp2.la' is not a valid libtool archive
make[2]: Leaving directory '/usr/local/directadmin/custombuild/modsecurity-2.9.7/apache2'
make[2]: *** [Makefile:712: mod_security2.la] Error 1
make[1]: *** [Makefile:612: all] Error 2
make[1]: Leaving directory '/usr/local/directadmin/custombuild/modsecurity-2.9.7/apache2'
*** The make has failed. Exiting...
Fortunately I had made a snapshot of the machine so I could revert.
It seems that it's still trying to look for a libnghttp2 in /usr/local, but that was removed:
local package 'libnghttp2' is removed, it can be restored with command:
da build restore_old_local libnghttp2
But the system provided libnghttp2 is installed and should be usable:
dpkg -l|grep libnghttp
ii libnghttp2-14:amd64 1.40.0-1ubuntu0.1 amd64 library implementing HTTP/2 protocol (shared library)
ii libnghttp2-dev 1.40.0-1ubuntu0.1 amd64 library implementing HTTP/2 protocol (development files)
Does anyone have debugging tips?

Would be much appreciated, cause I'm stumped!

Thanks!
CF
 
Maybe, there have some garbage that doesn't delete/clean of manual compiler libnghttp2.


Try show relate files by simple command.
Code:
find /usr/local -type f -name *libnghttp2*
ldconfig -p | grep libnghttp2

p.s. Leave over files should be in "/usr/local/"
 
Hi,

I have the same issue after having used "da build remove_old_local libnghttp2"
Compilation of php 8.2.13 complains that /usr/local/lib/libnghttpd2 library cannot be found.
library is well installed by default:
Code:
ns.***.net:tmp# ldconfig -p | grep libnghttp
        libnghttp2.so.14 (libc6,x86-64) => /lib/x86_64-linux-gnu/libnghttp2.so.14
        libnghttp2.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libnghttp2.so
After having launched "da build restore_old_local libnghttp2" compilation was OK.

If I check which library is used by php, it shows the system library !
Code:
ns.***.net:tmp# ldd /usr/local/php82/bin/php | grep libnghttp2
        libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007f407933f000)

FYI, I'm running Debian 12, upgraded from Debian 10, and later Debian 11 with the alpha version 1.658 of DirectAdmin
I also tried with the curent 1.657 version, which didn't change anything.

Dan

<edit: I forgot to mention I had removed the line "http2=1" in directadmin.conf and restarted directadmin.>
 
Hello,

Make sure you don't include it in configure.php* under /usr/local/directadmin/custombuild/custom/php/ or /usr/local/directadmin/custombuild/custom/fpm/
 
The `./build all` tries to build ModSecurity, but that fails because /usr/local/lib/libnghttp2.la is not there:


OK, I see. It seems it's used by Apache or mod_security. You might check them too.

/usr/local/directadmin/custombuild/custom/modsecurity
/usr/local/directadmin/custombuild/custom/ap2

Apache might be compiled with a custom version of libnghttp2 for HTTP/2 support.
 
I had one line "enable-http2" in apache config file.

I removed it, launched the "build remove_old_local, recompiled apache: OK with http2 still supported.

Compilation of php 8.2.13 gave these error messages:
Code:
libtool: link: cannot find the library `/usr/local/lib/libnghttp2.la' or unhandled argument `/usr/local/lib/libnghttp2.la'
make: *** [Makefile:326 : sapi/fpm/php-fpm] Erreur 1
make: *** Attente des tâches non terminées....
libtool: link: cannot find the library `/usr/local/lib/libnghttp2.la' or unhandled argument `/usr/local/lib/libnghttp2.la'
make: *** [Makefile:314 : sapi/cli/php] Erreur 1
libtool: link: cannot find the library `/usr/local/lib/libnghttp2.la' or unhandled argument `/usr/local/lib/libnghttp2.la'
make: *** [Makefile:368 : sapi/phpdbg/phpdbg] Erreur 1
libtool: link: cannot find the library `/usr/local/lib/libnghttp2.la' or unhandled argument `/usr/local/lib/libnghttp2.la'
make: *** [Makefile:354 : sapi/litespeed/php] Erreur 1
libtool: link: cannot find the library `/usr/local/lib/libnghttp2.la' or unhandled argument `/usr/local/lib/libnghttp2.la'
make: *** [Makefile:394 : sapi/cgi/php-cgi] Erreur 1
grep: /usr/local/lib/libnghttp2.la: No such file or directory
/usr/bin/sed: can't read /usr/local/lib/libnghttp2.la: No such file or directory
libtool: link: `/usr/local/lib/libnghttp2.la' is not a valid libtool archive
make: *** [Makefile:166 : libphp.la] Erreur 1
doPhp_build: failed to compile '/usr/local/directadmin/custombuild/cache/php-8.2.13.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.RGnQ7V63Ma.php-8.2.13.tar.gz'
 
Last edited:
Hello,

I've found the lingering curly bits causing the issue.
The PKG_CONFIG_PATH variable was set to /usr/local/lib/pkgconfig, which housed some leftover curl bits, which is why that path was used.

The short of it, to clear the old curl, you'd do:
Code:
da build doMigrateToSystemCurl

which could clear out the old curl bits from /usr/local/lib.
That prevents build from setting PKG_CONFIG_PATH to the old pkgconfig. which.. somehow allows things to find libnghttp2 in it's proper location in /usr/lib64/libnghttp2.so

Let us know if the problem persists.
 
Hi,

This didn't fix the issue with libnghttp2 when compiling php 8.2 :(

Apart from that, when restoring the old nghttp2, compilation was OK but I now have 2 messages as follows :
Code:
libtool: link: warning: library `/usr/lib/x86_64-linux-gnu/libcurl.la' was moved.
repeated a few times, and :
Code:
Enabling php-fpm82 in systemd...
Restarting apache.
Rewriting all users httpd.conf files, please wait...
license is expired, task is added to the queue file to be executed later
PHP 8.2.13 Installed.

As I mentioned elsewhere, I'm running mariadb 10.6.16 and should not have a license issue.
I tried installing another license (out the 176 licenses I have) and had the same problem.

Login page states :
Code:
legacy code-base does not support this MySQL version, downgrade MySQL or upgrade DirectAdmin license

To clear the first libcurl.a message, I reinstalled curl and libcurl but that didn't help.
 
@webmaster-hub please make sure you do not have custom libcurl in /usr/local, you can remove it with command da build doMigrateToSystemCurl. It is not reported by the old libraries list to avoid auto-removing it if someone installed libcurl manually.

Regarding the licensing error, it seems DA detected MySQL installation (not MariaDB). Please open a support ticket and we will check it out.
 
Hi fln,

I launched "da build doMigrateToSystemCurl" as soon as I saw the DirectAdmin Support post dated yesterday 12:10 AM

Code:
ns***.net:custombuild# ldd /usr/local/php82/bin/php82 | grep libnghttp
        libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007ff50c5a3000)
ns.***:custombuild# ldd /usr/local/php82/bin/php82 | grep libcurl
        libcurl.so.4 => /lib/x86_64-linux-gnu/libcurl.so.4 (0x00007feb4a0a6000)
ns.***:custombuild# ldd /usr/bin/curl | grep libnghttp
        libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007fe95cbfa000)

After "da build remove_old_local nghttp2", php 8.2 does not compile.
After "da build restore_old_local nghttp2, it compiles but still shows the errors regarding libcurl.a and licensing

I opened a ticket this morning for the licensing error.
 
@fln

Checking a bit further, I found a leftover /usr/lib/x86_64-linux-gnu/libcurl.la ASCII text file containing a mention of the library /usr/local/lib/libnghttp2
I moved that file to /root/, reinstalled curl and libcurl, launched "da build remote_old_local nghttp2" and this time php 8.2 compilation completed correctly.

Thanks for your hint. It definitely helped !

Still the licensing error, but the ticket is open, and it was definitely unrelated.
 
Last edited:
Back
Top