在Solaris 10 64位上配置PHP

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了在Solaris 10 64位上配置PHP脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我们目前在solaris 10服务器上运行 PHP 5.2.13.我需要启用一些额外的功能,所以我去运行配置脚本,但我遇到了一些错误.

我做了’export CFLAGS =“ – m64”’以确保GCC在64位模式下编译,但看起来我没有64位版本的libiconv.so.我尝试用’–wIThout-iconv’运行脚本,但没有骰子.这是我的config.LOG的结尾:

configure:20017: checking for strftime
configure:20471: checking whether to enable LIBXML support
configure:20519: checking libxML2 install dir
configure:20548: checking for xml2-config path
configure:20706: checking whether libxml build works
configure:20733: gcc -o conftest -m64  -D_posix_pthread_SEMANTICS  -R/usr/ucblib -L/usr/ucblib -R/usr/local/lib/../lib/gcc/sparc-sun-solaris2.10/3.4.6 -L/usr/local/lib/../lib/gcc/sparc-sun-solaris2.10/3.4.6 -R/usr/local/lib -L/usr/local/lib conftest.c 

     -lrt -lresolv -lm -lnsl -lsocket  -lgcc -lxml2 -lz -liconv -lm -lsocket -lnsl 1>&5
ld: fatal: file /usr/local/lib/libiconv.so: wrong ELF class: ELfcLASS32
ld: fatal: File PRocessing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: Failed program was:
#line 20722 "configure"
#include "confdefs.h"


    char xmlInitParser();
    int main() {
      xmlInitParser();
      return 0;
    }

有没有办法解决?从昨天开始,我一直在反对一点.如果有帮助,这是我的配置行:

./configure  --prefix=/usr/local/PHP --with-config-file-path=/usr/local/PHP/lib --with-libxml-dir=/usr/local --with-zlib=/usr/local --with-xpm-dir=/usr/local --with-MysqL=/usr/local/MysqL --with-MysqLi=/usr/local/MysqL/bin/MysqL_config --with-apxs2=/usr/local/apache2/bin/apxs --without-pgsql --with-jPEg-dir=/usr/local/lib --with-zlib-dir=/usr/local/lib --with-gd=/usr/local --enable-mbstring --enable-exif --enable-force-cgi-redirect --enable-sockets --with-png-dir=/usr/local/lib --with-curl=/usr/local --with-ldap=/usr/local --with-openssl=/usr/local/ssl --with-gettext --with-pcre-dir=/usr/local --with-freetype-dir=/usr/local --with-mssql=/usr/local/freetds --with-readline --enable-SOAp
这一直是我对Solaris的最大麻烦.基本上,如果您要编译某些内容,则需要确保以下所有内容都正确:

> CFLAGS / CXXFLAGS(适用于C)
> LDFLAGS(用于@L_360_33@器)
>可能是LD_LIbrARY_PATH

确保所有包含目录(使用-I指定)和库目录(-R和/或-L)与您正在构建的体系结构相匹配.对于Solaris,gcc通常首先查看/usr/lib,/usr/sfw / lib等,但如果你想要64位,则需要针对/usr/lib / 64,/usr/sfw / lib / 64进行编译,等 – 指定gcc -m64是不够的.

您可以使用ldd和file验证现有iconv库的ISA.如果你自己编译了libiconv,你需要重新编译它,否则找到另一个二进制或者……重新编译它:-)

脚本宝典总结

以上是脚本宝典为你收集整理的在Solaris 10 64位上配置PHP全部内容,希望文章能够帮你解决在Solaris 10 64位上配置PHP所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。