Author Topic: Cannot Install PHP-FPM on Alma 8 & 9  (Read 24 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Cannot Install PHP-FPM on Alma 8 & 9
« on: Today at 11:40:36 AM »
Can someone help me with this, i dont know if there is a workaround now, it has been a week now when i install CWP on a fresh Alma 8 or 9 Building a php-fpm is a completelly fail. CWP Version 1.7

Thanks.

Offline
*
Re: Cannot Install PHP-FPM on Alma 8 & 9
« Reply #1 on: Today at 08:20:54 PM »
onfigure: error: Package requirements (libpng) were not met:
Package 'libpng', required by 'virtual:world', not found
PHP's ./configure uses pkg-config to locate libpng (for the GD extension). pkg-config couldn't find it, so configure aborted and the whole build died.

Root cause: libpng-devel was installed — but only the i686 (32-bit) package. A 32-bit -devel drops its pkg-config file at:


/usr/lib/pkgconfig/libpng.pc      ← 32-bit path
But on a 64-bit box, pkg-config only searches:


/usr/lib64/pkgconfig : /usr/share/pkgconfig   ← note: /usr/lib (32-bit) NOT included
So pkg-config --exists libpng returned false even though the package looked installed. (This is a CWP-on-AL9 quirk — some of its build-dep steps pull .i686 packages.)

The fix — install the x86_64 dev package so the .pc lands in the path pkg-config actually searches:


dnf -y --enablerepo=crb,epel install libpng-devel.x86_64 gd-devel postgresql-devel
Note: on AlmaLinux 9 the -devel repo is crb (CodeReady Builder), which replaced AL8's powertools. After this, /usr/lib64/pkgconfig/libpng.pc exists and pkg-config --exists libpng → OK (1.6.37), so the GD/libpng configure step passes and PHP compiles.