How to fix libtool: Version mismatch error

Hello,

A couple of days ago I encountered the following issue when installing memcache using pecl:

This should have been a simple thing, it is usually works using a simple command:

pecl install memcache

Unfortunately this time it did not, it just returned the following messages:

libtool: Version mismatch error.  This is libtool 2.2.10, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 2.2.10

The answer is simple and you have instructions on what you have to do in the error message, so this is what you have to do:

1. Download the package:

pecl download memcache

2. Extract the package && navigate to the right directory:

tar -zxvf memcache-2.2.6.tgz
cd memcache-2.2.6/

3.  Run phpize:

phpize --clean
phpize

4. Remove the aclocal.m4 file:

rm aclocal.m4

5. Run aclocal and autoconf:

aclocal
autoconf

6. Now configure, make and install the package:

./configure
make
make install

Everything should work, if you encounter any other issues just read the error messages and follow the instructions.

I have encountered the same problem with apc and geoip extensions also, I followed the same steps and managed to install these without any other issues.

Leave a Reply

Your email address will not be published. Required fields are marked *