Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Summary of compilation and installation problems in LAMP environment

Shulou Source: shulou.com Published: 2022-06-01 08:16:31 10月03日 Update

apache:

Question:

Error mod_deflate has been requested but can not be built due to prerequisite failures

Solution:

Zlib package is not installed. Run command:

yum install zlib-devel

PHP:

Question:

mcrypt.h not found. Please reinstall libmcrypt

yum install libmcrypt libmcrypt-devel compiled, or error.

Solution:

When compiling PHP, --with-mcrypt=/usr/local/libmcrypt/adds the mcrypt path. It solves the problem.

./ configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt=/usr/local/libmcrypt/ --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif --disable-ipv6

Question:

configure: error: xml2-config not found. Please check your libxml2 installation.

Solution:

yum install -y libxml2-devel

Summary: Before compiling and installing LAMP, install the libraries that need to be installed in advance with yum. Avoid making mistakes.

yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers

If you encounter problems again, follow the error prompt. Resolved. Common problems are caused by a lack of libraries required for installation.

Tags: Problem compile error command time path or install prompt run environment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple vpn MySQL Docker Redmi