apache:
問題:
安裝apache的時候入到 error: mod_deflate has been requested but can not be built due to prerequisite failures的錯誤。
解決:
沒有安裝zlib包。運行命令:
yum install zlib-devel
PHP:
問題:
編譯安裝php出錯mcrypt.h not found. Please reinstall libmcrypt
yum install libmcrypt libmcrypt-devel之后編譯,還是報錯。
解決:
編譯PHP時, --with-mcrypt=/usr/local/libmcrypt/ 加入mcrypt路徑。即可解決問題。
./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
問題:
configure: error: xml2-config not found. Please check your libxml2 installation.
解決:
yum install -y libxml2-devel
總結:編譯安裝LAMP前,把事先需要安裝的庫用yum安裝下。避免發生一些錯誤。
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
再遇到問題,根據錯誤提示。解決。一般問題都是因為缺少安裝所需要的庫導致。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。