mac php

来源:互联网 发布:淘宝店铺装修书籍 编辑:程序博客网 时间:2024/05/29 07:21


./configure --prefix=/usr/local/webserver/php --with-config-file-path=/etc  --with-freetype --with-jpeg --with-png --with-zlib  --with-mhash --enable-fpm --with-openssl --with-zlib --enable-mbstring --with-mcrypt --with-mysql=/usr/local/webserver/mysql --with-mysql-sock=/tmp/mysql.sock --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --enable-sockets --with-iconv=/usr/local/iconv --with-curl

上面无效

php5.4.19

./configure --prefix=/usr/local/webserver/php --with-config-file-path=/etc --with-iconv-dir=/usr/local/ --with-freetype-dir --with-mysql=/usr/local/webserver/mysql --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-jpeg-dir --with-png-dir --with-zlib --enable-ftp --with-libxml-dir --enable-xml --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --enable-fpm --with-xmlrpc --enable-zip --enable-soap --with-pear 



tar zxvf libmcrypt-2.5.8.tar.gz

cd libmcrypt-2.5.8/libltdl
./configure --enable-ltdl-install
make
make install
cd ..
./configure --prefix=/usr
make
make install

cd ..




tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
cd src
vi rfc2440.c

  FreeBSD与Linux的不同点,造成需要对 mcrypt 的源码进行一下小小的修改,才能在FreeBSD下编译通过。将其中的
引用
#include <malloc.h>

  修改为
引用
#include <stdlib.h>

  然后继续编译
引用
./configure --prefix=/usr
make
make install
cd ..




gd库


 decided to build from source code.

Several libraries are missing in my Mountain Lion.

FreeType: (link)

Deal with:

/usr/local/include/ft2build.h:56:10: fatal error: ‘freetype/config/ftheader.h’ file not found

after install freetype, a soft link should be made for matplotlib to locate the freetype.

ln -s /usr/local/include/freetype2/freetype/ /usr/include/freetype

LIBPNG: (link)

You can test the matplotlib by importing the pylab module in your python shell.

from pylab import *