【发布时间】:2016-04-07 10:33:38
【问题描述】:
我正在尝试编译和安装 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:版本不匹配错误。这是 libtool 2.4.6,但是 libtool:此 LT_INIT 的定义来自旧版本。 libtool:您应该使用 libtool 2.4.6 中的宏重新创建 aclocal.m4 libtool: 并再次运行 autoconf。 Makefile:193:目标“redis.lo”的配方失败 make: *** [redis.lo] 错误 63现在这是我遵循的步骤:
git 克隆 https://github.com/phpredis/phpredis.git cd phpredis/ git结帐php7 phpize && ./configure --with-php-config=/usr/bin/php-config && make工具版本:
# 自动配置 --version 自动配置 (GNU Autoconf) 2.69 # aclocal --version aclocal (GNU automake) 1.15 # libtoolize --version libtoolize (GNU libtool) 2.4.6运行autoreconf --force --install 我得到以下信息:
那么我做:
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
现在运行autoreconf --force --install 没有输出,但我在尝试编译phpredis 时仍然遇到同样的错误。
【问题讨论】:
-
最好提交更新。例如,
AC_CONFIG_MACRO_DIRS([m4])在configure.ac中,然后是LT_PREREQ([2.4.6])和LT_INIT之后。这可能会将所有内容放在正确的位置:autoreconf -fvi
标签: c# c autotools autoconf libtool