104

Getting another error when configuring memcahed with php in XAMPP in CentOS

#  /opt/lampp/bin/phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.

How to resolved it ?

Lakshmikandan
  • 4,301
  • 3
  • 28
  • 37

6 Answers6

135

MAC Users

You can do it easily using brew.

brew install autoconf

user3127648
  • 1,367
  • 12
  • 26
RASEL RANA
  • 2,112
  • 1
  • 15
  • 17
82

I got here looking for an answer for docker when using Alpine linux this worked for me (I tried @Dimitros solution but did not work):

RUN apk --no-cache add pcre-dev ${PHPIZE_DEPS} \ 
  && pecl install xdebug \
  && docker-php-ext-enable xdebug \
  && apk del pcre-dev ${PHPIZE_DEPS}
lloiacono
  • 4,714
  • 2
  • 30
  • 46
  • 4
    This works! just don't forget to follow docker image's documentation `It is strongly recommended that users use an explicit version number in their pecl install invocations to ensure proper PHP version compatibility` – Alwin Kesler Jan 17 '19 at 22:19
  • Im still getting errors: The command '/bin/sh -c apk add --no-cache pcre-dev ${PHPIZE_DEPS} && pecl install xdebug-2.6.0 && docker-php-ext-enable xdebug && apk del pcre-dev ${PHPIZE_DEPS}' returned a non-zero code: 4 – Marcelo Fonseca Jun 28 '19 at 18:03
  • 2
    For me this was enough: `apk --no-cache add autoconf g++ make && pecl install xdebug && docker-php-ext-enable xdebug && rm -rf /tmp/pear; apk del autoconf g++ make;` in `php:8.0.2-alpine` docker image – piotrekkr Feb 12 '21 at 13:44
  • 1
    @piotrekkr Thanks! This solution works great within a container of the docker-image php:8.0.20RC1-zts-alpine3.16 – JackLeEmmerdeur May 27 '22 at 23:12
59

You need to install autoconf

For CentOS:

# yum install autoconf

for Ubuntu :

# apt-get install autoconf

for fedora 24-27:

   # dnf install autoconf
Lakshmikandan
  • 4,301
  • 3
  • 28
  • 37
39

For Alpine Linux the apk add feature has (for cleanup) a concept of virtual packages using the --virtual or -t switch. An example use of this would be removing a group of build dependencies all at once:

apk add --no-cache --update --virtual buildDeps autoconf \
 && pecl install xdebug \
 && docker-php-ext-enable xdebug \
 && apk del buildDeps

Reference: https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md

b01
  • 4,076
  • 2
  • 30
  • 30
Dimitrios Desyllas
  • 9,082
  • 15
  • 74
  • 164
1

For openSuSE:

zypper install autoconf
Xedret
  • 1,823
  • 18
  • 25
-1

I resolved the problem by "yum install autoconf" on CentOS 7

baifuwa
  • 1
  • 1
  • 2
    There are other answers that provide the OP's question, and they were posted some time ago. When posting an answer, please make sure you add either a new solution, or a substantially better explanation, especially when answering older questions. Make sure to provide an explanation what your code does and how it solves the problem. – help-info.de Apr 21 '19 at 08:57