当前位置:找DLL下载站系统新闻软件疑难软件问题 → 64位系统下使用xampp,扩展spidermoney

64位系统下使用xampp,扩展spidermoney

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2018/3/26 0:08:56

系统: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 directory

yum install -y libgcc_s.so.1

[root@localhost opt]# yum install -y libgcc_s.so.1
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.neu.edu.cn
 * extras: mirrors.yun-idc.com
 * updates: mirrors.yun-idc.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libgcc.i686 0:4.4.7-11.el6 will be installed
--> Finished Dependency Resolution
Error:  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]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter

……

 

安装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/src
make -f Makefile.ref

在此编译好后,把整个js目录复制到64位系统下,执行以下步骤:
mkdir -p /usr/include/smjs/ -v
cp *.{h,tbl} /usr/include/smjs/ -v
cd Linux_All_DBG.OBJ
cp *.h /usr/include/smjs/ -v
mkdir -p /usr/local/{bin,lib}/ -v
cp js /usr/local/bin/ -v
cp 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命令