PHP 7.4 installation error

stefantriep

Verified User
Joined
Dec 15, 2012
Messages
70
Location
Haarlem, The Netherlands
If I try to install PHP 7.4 on Centos 6.9 I got this error:

Cannot find cmake, installing it...
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: ***
* extras: ***
* updates: ***
No package cmake3 available.
Error: Nothing to do
Found /usr/local/directadmin/custombuild/libzip-1.5.2.tar.gz
Extracting ...
Done.
Configuring libzip-1.5.2...
./custombuild/build: line 14579: cmake3: command not found
Done. Making libzip-1.5.2...
Trying to make libzip...
make: *** No targets specified and no makefile found. Stop.
 
Different installation error on Debian 9. I can't tell if it's a bug or if 2GB RAM is just not enough to install it since PHP 7.3 installed flawlessly

Code:
/bin/bash /usr/local/directadmin/custombuild/php-7.4.0/libtool --silent --preserve-dup-deps --mode=compile cc -I/usr/local/directadmin/custombuild/php-7.4.0/ext/fileinfo/libmagic -Iext/fileinfo/ -I/usr/local/directadmin/custombuild/php-7.4.0/ext/fileinfo/ -DPHP_ATOM_INC -I/usr/local/directadmin/custombuild/php-7.4.0/include -I/usr/local/directadmin/custombuild/php-7.4.0/main -I/usr/local/directadmin/custombuild/php-7.4.0 -I/usr/local/directadmin/custombuild/php-7.4.0/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/libpng16 -I/usr/local/include/freetype2 -I/usr/local/icu/include -I/usr/local/directadmin/custombuild/php-7.4.0/ext/mbstring/libmbfl -I/usr/local/directadmin/custombuild/php-7.4.0/ext/mbstring/libmbfl/mbfl -I/usr/local/directadmin/custombuild/php-7.4.0/TSRM -I/usr/local/directadmin/custombuild/php-7.4.0/Zend    -I/usr/local/include -g -O2 -fvisibility=hidden -Wall -Wno-strict-aliasing -DZEND_SIGNALS   -c /usr/local/directadmin/custombuild/php-7.4.0/ext/fileinfo/libmagic/apprentice.c -o ext/fileinfo/libmagic/apprentice.lo
virtual memory exhausted: Cannot allocate memory
Makefile:924: recipe for target 'ext/fileinfo/libmagic/apprentice.lo' failed
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
 
Code:
yum -y install cmake3

Fixed in latest version of CustomBuild, which will install it for you. Only CentOS 6/7 have been affected, and only PHP 7.4 :) Thank you for the report.

@HolyDiver - may you try adding 1GB of swap?
 
Sorry my english.
This is the error I encountered: cmake3: command not found
And I tried and work for me.
Code:
yum -y install cmake
 
I installed PHP7.4 but could not start it, I found that during the installation I could not load the following file:

Code:
Connecting to files12.directadmin.com (files12.directadmin.com)|180.92.182.216|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-11-28 23:48:29 ERROR 404: Not Found.

Downloaded file /usr/local/directadmin/custombuild/php-fpm.conf.74 does not exist or is empty after download
cwd is: /usr/local/directadmin/custombuild
Fileserver might be down, using the backup file server..
--2019-11-28 23:48:29--  http://69.162.69.58/services/custombuild/php-fpm.conf.74
Connecting to 69.162.69.58:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-11-28 23:48:30 ERROR 404: Not Found.

Pls healp me.
 
@HolyDiver - may you try adding 1GB of swap?
@smtalk Thanks, that did the trick! I was missing a mere 5MB of swap. Is swap important for these kind of installations?

Also I noticed the same error that bibiugly posted. The php-fpm.conf.74 file is missing on the DirectAdmin servers.
 
EPEL repo is required for yum to find cmake3 package:

yum install epel-release; yum install cmake3;
 
Code:
configure: error: Package requirements (krb5-gssapi krb5) were not met:

Package 'krb5-gssapi', required by 'virtual:world', not found
Package 'krb5', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables KERBEROS_CFLAGS
and KERBEROS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

*** There was an error while trying to configure php. Check the configure file

I will try to install /usr/ports/security/krb5 now and retry...
 
Yes, that was it. On FreeBSD you need to have /usr/ports/security/krb5 installed.
 
Epel-release en cmake3 is implemented I see, but now I got this new error:

Scanning dependencies of target man
/bin/sh: cmake: command not found
make[2]: *** [regress/CMakeFiles/testinput] Error 127
make[1]: *** [regress/CMakeFiles/testinput.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

And later in the process:

[ 85%] Linking C shared library libzip.so
[ 85%] Built target zip
make: *** [all] Error 2
 
Epel-release en cmake3 is implemented I see, but now I got this new error:

Scanning dependencies of target man
/bin/sh: cmake: command not found
make[2]: *** [regress/CMakeFiles/testinput] Error 127
make[1]: *** [regress/CMakeFiles/testinput.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

And later in the process:

[ 85%] Linking C shared library libzip.so
[ 85%] Built target zip
make: *** [all] Error 2

Does "yum -y cmake" solve it?
 
The process continues to build, the make completes but at the configuring of the extensions part this error pops up:

checking whether to use system default cipher list instead of hardcoded value... no
checking for krb5-gssapi krb5... no
configure: error: Package requirements (krb5-gssapi krb5) were not met:

No package 'krb5-gssapi' found
No package 'krb5' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables KERBEROS_CFLAGS
and KERBEROS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

*** There was an error while trying to configure php. Check the configure file

Looks like the configure file needs some changes for the kerberos libs
 
@stefantriep What's output for these 3 commands ?

Code:
rpm -qa krb5*
pkg-config --modversion krb5 --cflags --libs
pkg-config --modversion krb5-gssapi --cflags --libs
example
Code:
rpm -qa krb5*
krb5-libs-1.15.1-37.el7_7.2.x86_64
krb5-devel-1.15.1-37.el7_7.2.x86_64

pkg-config --modversion krb5-gssapi --cflags --libs
1.15.1
 -lgssapi_krb5 
 
pkg-config --modversion krb5 --cflags --libs       
1.15.1
 -lkrb5 -lk5crypto -lcom_err

PHP 7.4 changed how it's detects extension dependencies see https://raw.githubusercontent.com/php/php-src/PHP-7.4/UPGRADING

========================================
13. Migration to pkg-config
========================================

A number of extensions have been migrated to exclusively use pkg-config for the
detection of library dependencies. Generally, this means that instead of using
--with-foo-dir=DIR or similar only --with-foo is used. Custom library paths can
be specified either by adding additional directories to PKG_CONFIG_PATH or by
explicitly specifying compilation options through FOO_CFLAGS and FOO_LIBS.


The following extensions and SAPIs are affected:

- Curl:
. --with-curl no longer accepts a directory.

- Enchant:
. --with-enchant no longer accepts a directory.

- FPM:
. --with-fpm-systemd now uses only pkg-config for libsystem checks. The
libsystemd minimum required version is 209.

- GD:
. --with-gd becomes --enable-gd (whether to enable the extension at all) and
--with-external-gd (to opt into using an external libgd, rather than the
bundled one).
. --with-png-dir has been removed. libpng is required.
. --with-zlib-dir has been removed. zlib is required.
. --with-freetype-dir becomes --with-freetype.
. --with-jpeg-dir becomes --with-jpeg.
. --with-webp-dir becomes --with-webp.
. --with-xpm-dir becomes --with-xpm.

- IMAP:
. --with-kerberos no longer accepts a directory.

- Intl:
. --with-icu-dir has been removed. If --enable-intl is passed, then libicu is
always required.

- Ldap:
. --with-ldap-sasl no longer accepts a directory.

- Libxml:
. --with-libxml-dir has been removed.
. --enable-libxml becomes --with-libxml.
. --with-libexpat-dir has been renamed to --with-expat and no longer accepts a
directory.

- LiteSpeed:
. --with-litespeed becomes --enable-litespeed.

- Mbstring:
. --with-onig has been removed. Unless --disable-mbregex has been passed,
libonig is required.

- ODBC:
. --with-iodbc no longer accepts a directory.
. --with-unixODBC without a directory now uses pkg-config (preferred).
Directory is still accepted for old versions without libodbc.pc.

- OpenSSL:
. --with-openssl no longer accepts a directory.
. --with-kerberos no longer accepts a directory.

- PCRE:
. --with-pcre-regex has been removed. Instead --with-external-pcre is provided
to opt into using an external PCRE library, rather than the bundled one.

- PDO_SQLite:
. --with-pdo-sqlite no longer accepts a directory.

- Readline:
. --with-libedit no longer accepts a directory.

- Sodium:
. --with-sodium no longer accepts a directory.

- SQLite3:
. --with-sqlite3 no longer accepts a directory.

- XSL:
. --with-xsl no longer accepts a directory.

- Zip:
. --with-libzip has been removed.
. --enable-zip becomes --with-zip.
 
I've got this output:

rpm -qa krb5*
krb5-devel-1.10.3-65.el6.x86_64
krb5-libs-1.10.3-65.el6.x86_64

pkg-config --modversion krb5 --cflags --libs
Package krb5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `krb5.pc'
to the PKG_CONFIG_PATH environment variable
No package 'krb5' found

pkg-config --modversion krb5-gssapi --cflags --libs
Package krb5-gssapi was not found in the pkg-config search path.
Perhaps you should add the directory containing `krb5-gssapi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'krb5-gssapi' found
 
That's strange. Do you have openssl-devel installed? As it has krb5-devel as its dependency.

Code:
rpm -q openssl-devel
 
Please let us know if this solves it for you:
Code:
yum -y install krb5-devel
 
Back
Top