安装php-5.3.13时,make报错:
ext/date/php_date.lo is not a valid libtool object。
查看libtool(由ltmain.sh生成)该错误是由于:
if (${SED} -e ’2q’ $arg | grep “^# Generated by .*$PACKAGE”) >/dev/null 2>&1; then 语句不成立而后续引起的。
正确的lo文件应该如下:
# ext/date/php_date.lo – a libtool object file# Generated by ltmain.sh – GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)## Please DO NOT delete this file!# It is necessary for linking the library.# Name of the PIC object.pic_object=none# Name of the non-PIC object.non_pic_object=’php_date.o’
初始的5行,是有libtool文件中compile时添加的。在用安装脚本运行configure和make时,经常发现未添加成功。这就导致了后面的错误。
而手工make clean后再 make,就没有问题了。