系统:centos6.5 64位
lampp包:php-5.3.0
默认该版本的lampp集成包不支持64位操作系统,要想安装在64位系统下,得添加32位的lib环境
执行/opt/lampp/bin/php -m (基本上是缺少什么直接yum安装就行)
[root@localhost opt]# ./lampp/bin/php -m
-bash: ./lampp/bin/php: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory[root@localhost opt]# yum install ld-linux.so.2 -y
继续
[root@localhost opt]# ./lampp/bin/php -m
./lampp/bin/php: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directoryyum install -y libgcc_s.so.1
[root@localhost opt]# yum install -y libgcc_s.so.1
Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirror.neu.edu.cn * extras: mirrors.yun-idc.com * updates: mirrors.yun-idc.comSetting up Install ProcessResolving Dependencies--> Running transaction check---> Package libgcc.i686 0:4.4.7-11.el6 will be installed--> Finished Dependency ResolutionError: Multilib version problems found. This often means that the root
报错:解决方法
yum install -y --setopt=protected_multilib=false libgcc_s.so.1 强制安装
[root@localhost opt]# ./lampp/bin/php -m
./lampp/bin/php: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory[root@localhost opt]# yum install -y --setopt=protected_multilib=false libstdc++.so.6[root@localhost opt]# ./lampp/bin/php -m
[PHP Modules]bcmathbz2calendarCorectypecurldatedbadomeregexiffileinfofilter……
安装spdiermonkey扩展:
由于64位的原因,如果在64位环境下编译的文件最后生成的也是64位的
可以用“file”命令进行验证
所以,当编译的时候,可以找一台32位的机器,可以是centos5.X的也可以是6.X的。最后把生成的spidermonkey.so文件复制到
lampp/lib/php/extensions/no-debug-non-zts-20090626/目录下
由于spidermonkey需求依赖js,再继续安装js,同理,也在32位系统下编译
wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz -O- | tar xvz
cd js/srcmake -f Makefile.ref在此编译好后,把整个js目录复制到64位系统下,执行以下步骤:
mkdir -p /usr/include/smjs/ -vcp *.{h,tbl} /usr/include/smjs/ -vcd Linux_All_DBG.OBJcp *.h /usr/include/smjs/ -vmkdir -p /usr/local/{bin,lib}/ -vcp js /usr/local/bin/ -vcp libjs.so /usr/local/lib/ -v以上安装完成后,运行/usr/local/bin/js 就应该可以启动js解释运行引擎了.(最主要是libjs.so文件,经测试,如果在64位系统下编译js,最后/usr/local/bin/js为64位的,直接把32位下生的js覆盖64位下的也一样可以正常使用)如果提示找不到libjs.so,则vi /etc/ld.so.conf添加一行/usr/local/lib然后执行ldconfig命令