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.

7 thoughts on “How to fix libtool: Version mismatch error”

  1. Thanks. This post helped me find out a lot more about the autoconf system.

    If someone is interested, a more in-depth tutorial on this matter can be found .

    Reply
  2. I am getting the same error. Please help me out

    /bin/bash /root/sqlsrv-4.3.0/libtool –mode=compile g++ -std=c++11 -I. -I/root/sqlsrv-4.3.0 -DPHP_ATOM_INC -I/root/sqlsrv-4.3.0/include -I/root/sqlsrv-4.3.0/main -I/root/sqlsrv-4.3.0 -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/root/sqlsrv-4.3.0/shared -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /root/sqlsrv-4.3.0/conn.cpp -o conn.lo
    libtool: Version mismatch error. This is libtool 2.4.2 Debian-2.4.2-1.11, but the
    libtool: definition of this LT_INIT comes from libtool 2.4.6.
    libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1.11
    libtool: and run autoconf again.
    Makefile:194: recipe for target ‘conn.lo’ failed
    make: *** [conn.lo] Error 63

    Reply

Leave a Reply to nikita Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.