C# libtool:应该使用libtool 2.4.6中的宏重新创建aclocal.m4

C# libtool:应该使用libtool 2.4.6中的宏重新创建aclocal.m4,c#,c,autotools,autoconf,libtool,C#,C,Autotools,Autoconf,Libtool,我正在尝试编译和安装phpredis存储库的分支php7,但出现以下错误: /bin/sh /root/phpredis/libtool --mode=compile cc -I. -I/root/phpredis - DPHP_ATOM_INC -I/root/phpredis/include -I/root/phpredis/main -I/root/phpredis -I/usr/lib64/php7.0/include/php -I/usr/lib64/php7.0/includ

我正在尝试编译和安装phpredis存储库的分支php7,但出现以下错误:

/bin/sh /root/phpredis/libtool --mode=compile cc -I. -I/root/phpredis - DPHP_ATOM_INC -I/root/phpredis/include -I/root/phpredis/main -I/root/phpredis -I/usr/lib64/php7.0/include/php -I/usr/lib64/php7.0/include/php/main -I/usr/lib64/php7.0/include/php/TSRM -I/usr/lib64/php7.0/include/php/Zend -I/usr/lib64/php7.0/include/php/ext -I/usr/lib64/php7.0/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/phpredis/redis.c -o redis.lo libtool: Version mismatch error. This is libtool 2.4.6, but the libtool: definition of this LT_INIT comes from an older release. libtool: You should recreate aclocal.m4 with macros from libtool 2.4.6 libtool: and run autoconf again. Makefile:193: recipe for target 'redis.lo' failed make: *** [redis.lo] Error 63 那么我会:

cat /usr/share/aclocal/libtool.m4 /usr/share/aclocal/ltoptions.m4 /usr/share/aclocal/ltsugar.m4 /usr/share/aclocal/ltversion.m4 /usr/share/aclocal/lt~obsolete.m4 >> aclocal.m4  
Then i add  AC_CONFIG_MACRO_DIRS([m4]) to the top level of configure.in

现在运行
autoeconf--force--install
不会给出输出,但在尝试编译phpredis时仍然会遇到相同的错误。

最后我解决了这个问题。如果遇到上述问题,请执行以下步骤以运行phpredis:

git clone https://github.com/phpredis/phpredis.git
cd phpredis/
git checkout php7
rm -f aclocal.m4
phpize
aclocal && libtoolize --force && autoreconf
./configure --with-php-config=/usr/bin/php-config && make
# in my case previous make command installed the redis.so into ~/phpredis/modules/ 
make install #optional

最好是提交更新。e、 例如,
configure.AC
中的
AC\u CONFIG\u MACRO\u DIRS([m4])
,然后是
LT\u PREREQ([2.4.6])
LT\u INIT
之后。这可能会考虑将所有内容放在正确的位置:
autoreconf-fvi
这似乎是PHP扩展的一个常见问题。同样的说明也适用于php memcached。 # autoreconf --force --install libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: You should add the contents of the following files to 'aclocal.m4': libtoolize: '/usr/share/aclocal/libtool.m4' libtoolize: '/usr/share/aclocal/ltoptions.m4' libtoolize: '/usr/share/aclocal/ltsugar.m4' libtoolize: '/usr/share/aclocal/ltversion.m4' libtoolize: '/usr/share/aclocal/lt~obsolete.m4' libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.in, libtoolize: and rerunning libtoolize and aclocal. libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
cat /usr/share/aclocal/libtool.m4 /usr/share/aclocal/ltoptions.m4 /usr/share/aclocal/ltsugar.m4 /usr/share/aclocal/ltversion.m4 /usr/share/aclocal/lt~obsolete.m4 >> aclocal.m4  
Then i add  AC_CONFIG_MACRO_DIRS([m4]) to the top level of configure.in
git clone https://github.com/phpredis/phpredis.git
cd phpredis/
git checkout php7
rm -f aclocal.m4
phpize
aclocal && libtoolize --force && autoreconf
./configure --with-php-config=/usr/bin/php-config && make
# in my case previous make command installed the redis.so into ~/phpredis/modules/ 
make install #optional