LNMP安裝報錯解決方案

######################################################################php

MYSQL報錯mysql


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

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

######################################################################sql

PHP報錯api


configure: error: no acceptable cc found in $PATHcurl

解決方案:yum install -y gccide


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

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


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

相關文章
相關標籤/搜索