In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to compile and install php7 mac, the article is very detailed, has a certain reference value, interested friends must read!
Mac compilation method to install php7: 1, through "wget -c http://mirrors.sohu.com/php/php-7.1.8.tar.gz" download PHP;2, through "tar -zxvf php-7.1.8.tar.gz" decompression compilation can be.
Operating environment: macOS 10.15 system, PHP 7.1.8 version, macbook pro 2020 computer.
Mac build install PHP 7.1.8:
1. Download the stable version of PHPwget -c http://mirrors.sohu.com/php/php-7.1.8.tar.gz2. Decompress and compile 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 Problems encountered:
apxs reported the wrong problem
Sorry, I cannot run apxs. Possible reasons follow:1. Perl is not installed2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs3. Apache was not built using --enable-so (the apxs usage page is displayed)
Solution: Find apxs in bin directory under httpd installation directory, try not to write/usr/bin/apxs
Because the Mac comes with openssl can not be upgraded (I did not find a way to upgrade), resulting in a lower version, error:
configure: error: OpenSSL version 1.0.1 or greater required.
Solution: Because Mac comes with openssl can not upgrade (I can not find the way to upgrade), use
brew install openssl
Install the latest version of openssl and add the path to the brew installation to the parameters
--with-openssl=/usr/local/Cellar/openssl@1.1/1.1.0e
--with-gettext error
configure: error: Cannot locate header file libintl.h
Solution:
brew install gettext
Open PHP's configure file and modify the file's
for i in $PHP_GETTEXT /usr/local /usr/ ;do
changed to
for i in $PHP_GETTEXT /usr/local /usr/ usr/local/opt/gettext;do
The libiconv error is as follows:
checking for iconv... nochecking for libiconv... noconfigure: error: Please specify the install prefix of iconv with --with-iconv=
Solution:
Install libiconv (character encoding library)
Website address: http://www.gnu.org/software/libiconv/
Current Version: 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
installation
make && sudo make install The above is "Mac how to compile and install php7" All the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.