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


你可能感兴趣的:(error,解决方案,include,should)