Home  >  Article  >  Backend Development  >  Solution to Cannot find autoconf when PHP dynamic compilation occurs, cannotautoconf_PHP tutorial

Solution to Cannot find autoconf when PHP dynamic compilation occurs, cannotautoconf_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:15:07806browse

The solution to Cannot find autoconf when PHP dynamic compilation occurs, cannotautoconf

This article details the solution to the problem of Cannot find autoconf when compiling PHP dynamically. Share it with everyone for your reference. The specific method is as follows:

After installing PHP, I want to dynamically compile PHP’s memcache extension library

Copy code The code is as follows:
cd memcache-2.2.5/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config

But an error occurred when executing /usr/local/webserver/php/bin/phpize:

Copy code The code is as follows:
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable is set correctly and then rerun this script.


After searching on the Internet, I found that many people have asked this question, so I excerpted it:
Copy the code The code is as follows:
# wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar. gz
# tar -zvxf m4-1.4.9.tar.gz
# cd m4-1.4.9/
# ./configure && make && make install
# cd ../
# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
# tar -zvxf autoconf-2.62.tar.gz
# cd autoconf-2.62/
# ./configure && make && make install

If it is UBUNTU, it can be simpler:
Copy the code The code is as follows:
sudo apt-get install m4
sudo apt-get install autoconf

Or directly:
Copy the code The code is as follows:
sudo apt-get install autoconf

Because autoconf depends on m4, it will be automatically downloaded to resolve this dependency.

I hope this article will be helpful to everyone’s PHP programming design.

phpize compilation, Cannot find autoconf Please check your autoconf installation and the $PHP_AUTOCONF

Try
yum install php-devel

yum install gcc gcc-c++

Hello, I read that you asked about cannot find -lxxx when compiling under LINUX. How did you solve it?

The compilation parameters of the makefile file lack this library
You can LFLAG= -L -lxxx
cc ​​$LFLAG
I will give you a specific example

IFLAG =-I. /include -I/usr/include
LFLAG = -L$(LIB_TARGET) -lutil
$(CC) $(CFLAGS) -o $@ $? $(LFLAG)

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/906668.htmlTechArticleSolution to Cannot find autoconf when PHP dynamic compilation occurs, cannotautoconf This article details the problem of Cannot find autoconf when PHP dynamic compilation occurs. Solution. Share it with everyone for your reference...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn