编译安装php5.4, make: *** [libphp5.la] 错误1

Compile and install php5.4, make: *** [libphp5.la] Error 1

我正在尝试使用以下构建配置构建 PHP:

./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr/include/libxml2/libxml --enable-xml  --enable-sockets --with-apxs2=/usr/local/httpd/bin/apxs --with-mcrypt  --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2=/usr/bin/bzip2  --enable-maintainer-zts

然后 运行 make。在构建过程中的某个时刻,我得到:

/usr/bin/ld: /usr/local/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libbz2.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1

关于我的系统的一些信息:

[root@localhost php-5.4.41]# rpm -qa|grep libxml
libxml2-devel-2.7.6-17.el6_6.1.x86_64
libxml2-2.7.6-17.el6_6.1.x86_64
[root@localhost php-5.4.41]# rpm -qa|grep  libtool
libtool-ltdl-devel-2.2.6-15.5.el6.x86_64
libtool-ltdl-2.2.6-15.5.el6.x86_64
libtool-2.2.6-15.5.el6.x86_64
[root@localhost php-5.4.41]# rpm -qa|grep bzip
bzip2-1.0.5-7.el6_0.x86_64
bzip2-libs-1.0.5-7.el6_0.x86_64

谁能帮帮我?

这看起来很像尝试再次编译非 64 位库。 /usr/local/lib/libbz2.a 似乎不是 libbz2 的正确位置(通常系统库安装在 /usr/lib 中)。它是如何安装的?