2013-02-21 61 views
0

我無法正確配置PHP。無法運行PHP,未找到libcurl

運行php -I給出了這樣的輸出:

PHP:錯誤而載入共享庫:libcurl.so.3:錯誤ELF類:ELFCLASS32

這裏是strace的命令的輸出,其中我已分開的問題區域到底..

$ strace php -i 
execve("/usr/bin/php", ["php", "-i"], [/* 38 vars */]) = 0 
brk(0)         = 0x1e54f000 
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b676cd36000 
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b676cd37000 
access("/etc/ld.so.preload", R_OK)  = -1 ENOENT (No such file or directory) 
open("/etc/ld.so.cache", O_RDONLY)  = 3 
fstat(3, {st_mode=S_IFREG|0644, st_size=167969, ...}) = 0 
mmap(NULL, 167969, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b676cd38000 
close(3)        = 0 
open("/lib64/libcrypt.so.1", O_RDONLY) = 3 
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\t`\377=\0\0\0"..., 832) = 832 
fstat(3, {st_mode=S_IFREG|0755, st_size=48600, ...}) = 0 
mmap(0x3dff600000, 2322880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3dff600000 
mprotect(0x3dff609000, 2093056, PROT_NONE) = 0 
mmap(0x3dff808000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x3dff808000 
mmap(0x3dff80a000, 184768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3dff80a000 
close(3)        = 0 
open("/usr/lib64/libaspell.so.15", O_RDONLY) = 3 
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\300\2\0\0\0\0\0"..., 832) = 832 
fstat(3, {st_mode=S_IFREG|0755, st_size=836408, ...}) = 0 
mmap(NULL, 2963928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b676cd62000 
mprotect(0x2b676ce27000, 2097152, PROT_NONE) = 0 
mmap(0x2b676d027000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc5000) = 0x2b676d027000 
mmap(0x2b676d02e000, 31192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b676d02e000 
close(3)        = 0 
open("/usr/lib64/libpspell.so.15", O_RDONLY) = 3 
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\4\0\0\0\0\0\0"..., 832) = 832 
fstat(3, {st_mode=S_IFREG|0755, st_size=3888, ...}) = 0 
mmap(NULL, 2099280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b676d036000 
mprotect(0x2b676d037000, 2093056, PROT_NONE) = 0 
mmap(0x2b676d236000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x2b676d236000 
close(3)        = 0 
open("/usr/local/gmp/lib/libgmp.so.3", O_RDONLY) = 3 
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\232\0\0\0\0\0\0"..., 832) = 832 
fstat(3, {st_mode=S_IFREG|0755, st_size=399787, ...}) = 0 
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b676d237000 
mmap(NULL, 2438464, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b676d238000 
mprotect(0x2b676d28a000, 2097152, PROT_NONE) = 0 
mmap(0x2b676d48a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x52000) = 0x2b676d48a000 
close(3)        = 0 
open("/lib64/libdb-4.3.so", O_RDONLY) = 3 
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\26\242\4>\0\0\0"..., 832) = 832 
lseek(3, 985404, SEEK_SET)    = 985404 
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\4\0\0\0\24\0\0\0", 32) = 32 
fstat(3, {st_mode=S_IFREG|0755, st_size=1008656, ...}) = 0 
mmap(0x3e04a00000, 3102392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3e04a00000 
mprotect(0x3e04af1000, 2097152, PROT_NONE) = 0 
mmap(0x3e04cf1000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf1000) = 0x3e04cf1000 
close(3)        = 0 




open("/lib64/tls/x86_64/libcurl.so.3", O_RDONLY) = -1 ENOENT (No such file or directory) 
stat("/lib64/tls/x86_64", 0x7fff993b0d80) = -1 ENOENT (No such file or directory) 
open("/lib64/tls/libcurl.so.3", O_RDONLY) = -1 ENOENT (No such file or directory) 
stat("/lib64/tls", 0x7fff993b0d80)  = -1 ENOENT (No such file or directory) 
open("/lib64/x86_64/libcurl.so.3", O_RDONLY) = -1 ENOENT (No such file or directory) 
stat("/lib64/x86_64", 0x7fff993b0d80) = -1 ENOENT (No such file or directory) 
open("/lib64/libcurl.so.3", O_RDONLY) = 3 
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\350\3\0\0004\0\0\0"..., 832) = 832 
close(3)        = 0 
stat("/lib64", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0 
open("/usr/lib64/tls/x86_64/libcurl.so.3", O_RDONLY) = -1 ENOENT (No such file or directory) 
stat("/usr/lib64/tls/x86_64", 0x7fff993b0d80) = -1 ENOENT (No such file or directory) 
open("/usr/lib64/tls/libcurl.so.3", O_RDONLY) = -1 ENOENT (No such file or directory) 
stat("/usr/lib64/tls", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 
open("/usr/lib64/x86_64/libcurl.so.3", O_RDONLY) = -1 ENOENT (No such file or directory) 
stat("/usr/lib64/x86_64", 0x7fff993b0d80) = -1 ENOENT (No such file or directory) 
open("/usr/lib64/libcurl.so.3", O_RDONLY) = 3 
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\350\3\0\0004\0\0\0"..., 832) = 832 
close(3)        = 0 
stat("/usr/lib64", {st_mode=S_IFDIR|0755, st_size=81920, ...}) = 0 
writev(2, [{"php", 3}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libcurl.so.3", 12}, {": ", 2}, {"wrong ELF class: ELFCLASS32", 27}, {"", 0}, {"", 0}, {"\n", 1}], 10php: error while loading shared libraries: libcurl.so.3: wrong ELF class: ELFCLASS32 
) = 85 
exit_group(127)       = ? 

我無法理解它是否能夠找到libcurl爲什麼它仍然給錯誤。?

回答

1

是否安裝了libcurl?如果您使用的是基於Debian的發行版,請嘗試:

apt-get install php5-curl 
+0

我正在使用RedHat。我也嘗試刪除並重新安裝沒有幫助的libcurl。 – 2013-03-01 09:21:08

0

這似乎是因爲libcurl已針對錯誤的架構進行編譯。

+0

安裝了Lib curl,但後來我發現我已經應用了一些可能導致此問題的libcurl修補程序。在發佈之前,我已經嘗試刪除libcurl並重新安裝,但沒有幫助。 – 2013-03-01 09:20:01

相關問題