LNMP安裝報錯解決方案

######################################################################

MYSQL報錯


./bin/mysqld: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

決解方案:yum install compat-libstdc++-33

######################################################################

PHP報錯


configure: error: no acceptable cc found in $PATH

解決方案:yum install -y gcc


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

解決方案:yum install -y libxml2-devel


configure: error: Cannot find OpenSSL's <evp.h>

解決方案:yum install -y openssl-devel


configure: error: Please reinstall the libcurl distribution -easy.h should be in <curl-dir>/include/curl/

解決方案:yum install -y curl-devel


configure: error: jpeglib.h not found

解決方案:yum install -y libjpeg-turbo-devel

或者yum install -y libjpeg-devel


configure: error: png.h not found.

解決方案:yum install -y libpng-devel


configure: error: freetype.h not found.

解決方案:yum install -y freetype-devel


configure: error: mcrypt.h not found. Please reinstall libmcrypt.

解決方案:yum install -y libmcrypt-devel

要是不能用yun安裝的話 ,就要去下載個gz包自己編譯安裝

解決方案:cd /usr/local/src/

wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz

tar -zxvf libmcrypt-2.5.7.tar.gz

cd libmcrypt-2.5.7 

mkdir -p /usr/local/libmcrypt

./configure prefix=/usr/local/libmcrypt/

make

make install

然後再編譯PHP時將--with-mcrypt改爲

--with-mcrypt=/usr/local/libmcrypt/

#######################################################################

編譯make

/usr/bin/ld: cannot find -lltdl

collect2: ld returned 1 exit status

make: *** [sapi/fpm/php-fpm] 錯誤 1

解決方案:yum install -y libtool-ltdl-devel

#######################################################################

nginx編譯報錯

./configure: error: the HTTP rewrite module requires the PCRE library.

解決方案:yum -y install pcre-devel


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章