我正在尝试在我的localhost上安装
PHP的xdiff库,以便我可以使用它进行一些测试.我的设置是PHP 5.3 Apache Mac OS X.不幸的是,xdiff没有macports端口.
原文链接:https://www.f2er.com/php/138675.html这是我到目前为止在/usr/lib文件夹中所做的事情:
sudo curl -O http://www.xmailserver.org/libxdiff-0.23.tar.gz tar -xzf libxdiff-0.23.tar.gz cd libxdiff-0.23/ ./configure make make install
然后我从这里下载了xdiff(http://pecl.php.net/package/xdiff)并做了:
PHPize ./configure make
(所有命令都是使用sudo制作的)
使用xdiff-1.5.1,安装看起来很有效.随着1.4.1我一直得到(也通过’pear install pecl / xdiff得到这个):
/bin/sh /usr/lib/xdiff-1.4.1/xdiff-1.4.1/libtool --mode=compile cc -I. -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1 -DPHP_ATOM_INC -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1/include -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1/main -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1 -I/opt/local/include/PHP -I/opt/local/include/PHP/main -I/opt/local/include/PHP/TSRM -I/opt/local/include/PHP/Zend -I/opt/local/include/PHP/ext -I/opt/local/include/PHP/ext/date/lib -I/opt/local/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/lib/xdiff-1.4.1/xdiff-1.4.1/xdiff.c -o xdiff.lo mkdir .libs cc -I. -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1 -DPHP_ATOM_INC -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1/include -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1/main -I/usr/lib/xdiff-1.4.1/xdiff-1.4.1 -I/opt/local/include/PHP -I/opt/local/include/PHP/main -I/opt/local/include/PHP/TSRM -I/opt/local/include/PHP/Zend -I/opt/local/include/PHP/ext -I/opt/local/include/PHP/ext/date/lib -I/opt/local/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/lib/xdiff-1.4.1/xdiff-1.4.1/xdiff.c -fno-common -DPIC -o .libs/xdiff.o /usr/lib/xdiff-1.4.1/xdiff-1.4.1/xdiff.c:39: error: duplicate ‘static’ make: *** [xdiff.lo] Error 1
extension=xdiff.so
没运气.有任何想法吗?