sudo apt-get install libxml2-dev
error: Cannot find OpenSSL's <evp.h>
1) Configure: error: xml2-config not found. Please check your libxml2 installation.
Solutions :
#yum installlibxml2libxml2-devel(For Redhat & Fedora) # aptitude install libxml2-dev (For ubuntu) |
2) Checking for pkg-config… /usr/bin/pkg-config
configure: error: Cannot find OpenSSL’s <evp.h>
Solutions :
#yum installopensslopenssl-devel |
3) Configure: error: Please reinstall the BZip2 distribution
Solutions :
# yum installbzip2bzip2-devel |
4) Configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
Solutions :
# yum installcurlcurl-devel (For Redhat & Fedora) # install libcurl4-gnutls-dev (For Ubuntu) |
5) Configure: error: libjpeg.(also) not found.
Solutions :
# yum installlibjpeglibjpeg-devel |
6) Configure: error: libpng.(also) not found.
Solutions :
# yum installlibpnglibpng-devel |
7) Configure: error: freetype.h not found.
Solutions :
#yum install freetype-devel |
8) Configure: error: Unable to locate gmp.h
Solutions :
# yum install gmp-devel |
9) Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
Solutions :
# yum install mysql-devel (For Redhat & Fedora) # apt-get install libmysql++-dev (For Ubuntu) |
10) Configure: error: Please reinstall the ncurses distribution
Solutions :
# yum installncursesncurses-devel |
11) Checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!
Solutions :
# yum install unixODBC-devel |
12) Configure: error: Cannot find pspell
Solutions :
# yum install pspell-devel |
13) configure: error: mcrypt.h not found. Please reinstall libmcrypt.
Solutions :
# yum install libmcrypt libmcrypt-devel (For Redhat & Fedora) # apt-get install libmcrypt-dev |
14) Configure: error: snmp.h not found. Check your SNMP installation.
Solutions :
# yum installnet-snmpnet-snmp-devel
|
15)出现错误configure: error:
checking for MySQL support… yes
checking for specified location of the MySQL UNIX socket… no
checking for MySQL UNIX socket location… /tmp/mysql.sock
checking for mysql_close in -lmysqlclient… no
checking for mysql_error in -lmysqlclient… no
configure: error: mysql configure failed. Please check config.log for more information.
Solutions :
#cd /usr/lib64
# ln -s /usr/lib64/mysql/libmysqlclient.so
# ldconfig
make时候执行
make ZEND_EXTRA
apt-get install htop binutils cpp flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl m4 libpcre3 libpopt-dev lynx make perl perl-modules openssl unzip zip autoconf2.13 gnu-standards automake libtool bison zlib1g-dev ntp ntpdate autotools-dev g++ bc subversion psmisc libmysqlclient-dev libcurl4-openssl-dev libjpeg62-dev libpng3-dev libxpm-dev libfreetype6-dev libt1-dev libmcrypt-dev libxslt1-dev libbz2-dev libxml2-dev libevent-dev libltdl-dev libmagickwand-dev imagemagick libncurses5-dev libsasl2-dev
cd cmake-2.8.4
./configure
make
make install
tar zxvf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1/
./configure --prefix=/usr/local
make
make install
cd ../
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
cd ../../
ll
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure
make
make install
cd ../
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install
cd ../
sudo tar zxvf pcre-8.10.tar.gz
sudo ./configure
sudo make
sudo make install
安装mysql
/usr/sbin/groupadd mysql
/usr/sbin/useradd -g mysql mysql
mkdir /data/mysql
tar zxvf mysql-5.5.12.tar.gz
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/ -DMYSQL_DATADIR=/data/mysql/db/-DMYSQL_UNIX_ADDR=/data/mysql/mysqld.sock -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_TCP_PORT=3306 -DEXTRA_CHARSETS=all -DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock -DMYSQL_USER=mysql -DWITH_DEBUG=0
make
make install
cd scripts/
chmod +x mysql_install_db
sudo ./mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/data/mysql/db
cp ../support-files/my-medium.cnf /usr/local/etc/my.cnf
cp ../support-files/mysql.server /etc/init.d/mysqld
cd /etc/init.d/
chmod +x mysqld
PHP安装
./configure --prefix=/usr/local/php --with-config-file-path=/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local//mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap
make ZEND_EXTRA_LIBS='-liconv'
make install
cp php.ini-development /etc/php.ini
php启动脚本 cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
nginx安装
sudo groupadd wwwsudo ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
sudo make
sudo make install
NGINX 不解析PHP问题(此错误犯了两次)
server {
listen 80;
server_name localhost;
index index.html index.htm index.php;#少了个;
root /data/wwwroot/sites;
location ~ .*\.(php)?$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi.conf;
}
#location ~ /\.ht {
# deny all;
#}
}
* The server quit without updating PID file (/data/mysql/mysql.pid). 路径配置 权限。mysqld_safe 的错误日志没有指定
chmod: cannot access `ext/phar/phar.phar': No such file or directory
make: [ext/phar/phar.phar] Error 1 (ignored)
解决方法:./configure的时候 要加上--without-pear
libmysqlclient.so.18: cannot open shared object file: No such file or dir
解决办法:
locate libmysqlclient.so.18
ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18
或
cp /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18
checking for libevent >= 1.4.11 install prefix... /usr/local
这个问题困扰了好久网上好多说法,不过最后的解决方法是 修改ld.so.conf文件配置libevent共享文件路径。
configure: error: GD build test failed
下载gd-2.0.33.tar.gz
tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
make
make install
/usr/local/lib/gd* /usr/lib/ 或者指定安装路径
cp /usr/local/include/gd.h /usr/lib/