'Installing PHP 7.4 manually (offline) on Linux Red Hat server

I have upgraded from PHP 5.3 to PHP 7.2 and the application is working. now I want to upgrade to PHP7.4, when I run the command

'./configure' '--prefix=/logi/php746' '--bindir=/logi/php746/bin' '--with-config-file-path=/logi/php746' '--with-libxml-dir=/logi/php7211/external-libs/libxml2'

I get the error

checking whether to build with LIBXML support... yes
checking for libxml-2.0 >= 2.7.6... no
configure: error: Package requirements (libxml-2.0 >= 2.7.6) were not met:

No package 'libxml-2.0' 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 LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

then I run the commend /logi/php7211/external-libs/libxml2/bin/xml2-config --version I get 2.9.0 this problem didn't happen when I installed php 7.2. also libxml 2.9.0 > 2.7.6



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source