比如php5.5升级到php5.6。
回复内容: 比如php5.5升级到php5.6。
用brew重新安装一个就好了
你可以像楼上几位说的那样,只用brew安装方便快捷。当然了你也可以自己下载编译安装,我之前装过php7是可以的,你可以试试看
wget http://.../php-7.0.2.tar.gztar zxvf php-7.0.2.tar.gz && cd php-7.0.2phpize./configure --prefix=/usr/local/php--mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs--with-config-file-path=/usr/local/php/etc --enable-cli --with-curl --with-bz2--with-zlib --with-zlib-dir --with-mcrypt --enable-pdo --with-mysql=mysqlnd--with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-openssl --with-imap-ssl--enable-exif --enable-zip --enable-ftp --enable-soap --enable-sockets--with-curlwrappers --with-gettext --with-pear --enable-calendar--enable-mbstring --enable-bcmath --with-mhash --with-iconv-dir --with-libxml-dir--enable-safe-mode --enable-mbregex --enable-fpm --with-freetype-dir --with-gd--with-jpeg-dir --with-png-dir --with-xmlrpc --enable-gd-native-ttf--enable-xml --enable-sysvsem --enable-sqlite-utf8 --with-xsl--enable-zend-multibyte --with-pcre-regex --with-pgsql --with-pdo-pgsqlmake && sudo make installsudo cp php.ini-development /usr/local/php/php.ini
全新安装mac osx 开发者环境 同时使用homebrew搭建 php,nginx ,mysql,redis,memcache ... ... (lnmp开发环境)
找到其中php的部分安装就好了,亲测有效!
brew 安装好后 ln -s ⋯⋯/bin/php /usr/local/bin/php