zoukankan      html  css  js  c++  java
  • Mac 下编译安装 php-5.6

    1.安装 PHP

    1.1 下载源码包

    http://php.net/get/php-5.6.35.tar.bz2/from/a/mirror

    1.2 编译&安装

    ./configure --prefix=/usr/local/php-5.6.35 --with-config-file-path=/usr/local/php-5.6.35/etc --with-bz2 --with-curl --enable-ftp 
    --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-iconv-dir 
    --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir --with-zlib --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd 
    --with-mysql=mysqlnd --enable-dom --enable-xml --enable-fpm 
    make & make install

    1.3 出现的错误处理

    提示错误:crun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    处理方法 :

    xcode-select --install

    提示错误:Cannot locate header file libintl.h

    处理方法 :

    brew install gettext
    brew link --force gettext
    echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.zshrc

    编辑 configure 文件,将 

    for i in $PHP_GETTEXT /usr/local /usr; do

    修改为:

    for i in $PHP_GETTEXT /usr/local /usr /usr/local/opt/gettext; do

    提示错误:Please reinstall the iconv library

    处理方法 :

    wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz
    tar xvzf libiconv-1.15.tar.gz
    ./configure 
    make && make install
  • 相关阅读:
    thinkphp 前后端分离
    git常用命令总结
    DIV常用属性大全
    shell编程学习之使用jq对json数据进行提取
    shell编程之if语句
    shell编程之变量赋值
    【总结】sqli-labs Less(1-35) 小结
    【总结】sqlmap常用命令
    【总结】kali(amd64)中安装nessus
    【总结】ettercap工具之DNS劫持
  • 原文地址:https://www.cnblogs.com/nasdaqhe/p/8941687.html
Copyright © 2011-2022 走看看