错ELF类 - PHP扩展 [英] Wrong ELF class - PHP extension

查看:361
本文介绍了错ELF类 - PHP扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图加载PHP扩展(sdo.so),但我收到以下错误,当我尝试运行XAMPP。

  PHP的警告:PHP启动:无法加载动态库'/opt/lampp/lib/php/extensions/no-debug-non-zts-20060613/sdo.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20060613/sdo.so:错ELF类:ELFCLASS64在未知在线0

这是我见过别人说什么,似乎被什么东西,用它做是一个64位的机器上编译,它需要32位。这是问题的根源在哪里?如果是的话我会怎样编译为32位Fedora的17我只看到Ubuntu的解决方案,不能让他们为我工作。


解决方案

  

这是我见过的其他人说,这似乎有什么东西,用它做是一个64位的机器上编译


没关系的你编译哪台机器的(构建主机)。重要的是的的编译什么机器(目标主机)。

您是(显然)运行32位IX86 PHP ,所以你需要编译 sdo.so 32位IX86为好。


  

我怎么会编译为32位Fedora的17


  ./配置CC ='gcc的-m32CXX = g ++的-m32'和;&安培;让&功放;&安培;使安装

应该是吧。

I am trying to load a PHP extension (sdo.so) but I am getting the following error when I try to run XAMPP.

PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20060613/sdo.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20060613/sdo.so: wrong ELF class: ELFCLASS64 in Unknown on line 0

From what I've seen other people say it seems to be something to do with it being compiled on a 64bit machine and it needs 32bit. Is this the root of the problem? If so how would I compile it as 32bit in Fedora 17 as I've only seen solutions for Ubuntu and couldn't get them to work for me.

解决方案

From what I've seen other people say it seems to be something to do with it being compiled on a 64bit machine

It doesn't matter on which machine you compile (the build host). What matters is for what machine you compile (the target host).

You are (apparently) running a 32-bit ix86 PHP, so you need to compile sdo.so for 32-bit ix86 as well.

how would I compile it as 32bit in Fedora 17

./configure CC='gcc -m32' CXX='g++ -m32' && make && make install

should be about it.

这篇关于错ELF类 - PHP扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆