十年網(wǎng)站開(kāi)發(fā)經(jīng)驗(yàn) + 多家企業(yè)客戶 + 靠譜的建站團(tuán)隊(duì)
量身定制 + 運(yùn)營(yíng)維護(hù)+專(zhuān)業(yè)推廣+無(wú)憂售后,網(wǎng)站問(wèn)題一站解決
本文操作環(huán)境:macOS10.15系統(tǒng),php7.1.8版,macbook pro 2020電腦。

10年積累的做網(wǎng)站、成都做網(wǎng)站經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶對(duì)網(wǎng)站的新想法和需求。提供各種問(wèn)題對(duì)應(yīng)的解決方案。讓選擇我們的客戶得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先網(wǎng)站設(shè)計(jì)后付款的網(wǎng)站建設(shè)流程,更有浠水免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。
mac 怎么編譯安裝 php7?
Mac編譯安裝PHP7.1.8:
wget -c http://mirrors.sohu.com/php/php-7.1.8.tar.gz
tar -zxvf php-7.1.8.tar.gz ./configure --prefix=/usr/local/php/7.1.8 \ --with-config-file-path=/usr/local/php/7.1.8/etc \ --with-config-file-scan-dir=/usr/local/php/7.1.8/etc/conf.d \ --with-apxs2=/usr/sbin/apxs \ --enable-fpm \ --with-fpm-user=www \ --with-fpm-group=www \ --with-mysqli \ --with-pdo-mysql \ --with-iconv-dir \ --with-freetype-dir \ --with-zlib \ --with-jpeg-dir \ --with-png-dir \ --with-libxml-dir=/usr/bin/xml2-config \ --enable-xml \ --disable-rpath \ --enable-bcmath \ --enable-shmop \ --enable-sysvsem \ --enable-inline-optimization \ --with-curl \ --enable-mbregex \ --enable-mbstring \ --with-mcrypt \ --enable-ftp \ --with-gd \ --enable-gd-native-ttf \ --with-openssl \ --with-mhash \ --enable-pcntl \ --enable-sockets \ --with-xmlrpc \ --enable-zip \ --enable-soap \ --without-pear \ --with-gettext \ --disable-fileinfo \ --enable-maintainer-zts \ --enable-mysqlnd
Sorry, I cannot run apxs. Possible reasons follow: 1. Perl is not installed 2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs 3. Apache was not built using --enable-so (the apxs usage page is displayed)
解決方案:查找httpd安裝目錄下的bin目錄里的 apxs ,盡量不要寫(xiě)/usr/bin/apxs
configure: error: OpenSSL version 1.0.1 or greater required.
解決方案:由于Mac自帶的openssl沒(méi)法升級(jí)(我沒(méi)找到升級(jí)的辦法),用
brew install openssl
安裝最新版的openssl,然后在參數(shù)中加上brew安裝的ssl的路徑
--with-openssl=/usr/local/Cellar/openssl@1.1/1.1.0e
configure: error: Cannot locate header file libintl.h
解決方案:
brew install gettext
打開(kāi)PHP的 configure文件,修改文件的
for i in $PHP_GETTEXT /usr/local /usr/ ;do
改成
for i in $PHP_GETTEXT /usr/local /usr/ usr/local/opt/gettext;do
checking for iconv... no checking for libiconv... no configure: error: Please specify the install prefix of iconv with --with-iconv=
解決方案:
安裝 libiconv (字符編碼轉(zhuǎn)換庫(kù))
網(wǎng)站地址: http://www.gnu.org/software/libiconv/
當(dāng)前版本: https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz
$ wget [https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz $ tar zxvf libiconv-1.15.tar.gz $ cd libiconv-1.15 $ ./configure --prefix=/usr/local/lib/libiconv $ make $ sudo make install
安裝
make && sudo make install