Dec 16

安装php5.4.45 执行./configure 出现了问题configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.的几个原因和可能解决方案 不指定

admin , 21:44 , 编程 » 编程(PHP) , 评论(0) , 引用(0) , 阅读(977) , Via 本站原创 | |
搜索
我已经获得阿里云幸运券,准备分享给您。请点击获取  

安装php5.4.45 执行./configure 出现了问题configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.的几个原因和可能解决方案
how to solve configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
百度了一下,网上有各种原因,总结如下
1、的确没有安装libc-client-devel 包,解决方法:
a、查看是否有安装,如下则已经安装
[root@server1.itlife365 ~]# rpm -qa libc-client-devel
libc-client-devel-2007e-11.el6.i686
[root@server1.itlife365 ~]#
安装64bit位系统的安装方法
[root@server1.itlife365  php-5.4.45]# yum install libc-client-devel
Loaded plugins: fastestmirror, security
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Setting up Install Process
Package libc-client-devel-2007e-11.el6.i686 already installed and latest version
Nothing to do

[root@server1.itlife365 php-5.4.45]#  yum install libc-client-devel.x86_64
Loaded plugins: fastestmirror, security
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Setting up Install Process
No package libc-client-devel.x86_64 available.
Error: Nothing to do
[root@server1.itlife365  php-5.4.45]#
32bit安装后的目录
[root@server1.itlife365 php-5.4.45]# ll /usr/lib64/libc-client.so

安装32bit位系统的安装方法
[root@server1.itlife365 php-5.4.45]#  yum install libc-client-devel.x86_64

32bit安装后的目录
[root@server1.itlife365 php-5.4.45]# ll /usr/lib/libc-client.so
lrwxrwxrwx 1 root root 19 Dec  7 21:09 /usr/lib/libc-client.so -> libc-client.so.2007
[root@server1.itlife365 php-5.4.45]#

2、安装了但是版本和操作系统位数对应不上
如何检查linux的版本呢?
查看linux机器是32位还是64位的方法:

file /sbin/init 或者file /bin/ls
/sbin/init: ELF64-bitLSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

如果显示 64-bit 则为64位;

file /sbin/init
/sbin/init: ELF32-bitLSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped

如果显示为32 bit 则为32bit;

uname -a:
uname -a
Linux pmx002**.**.**  2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010x86_64x86_64 x86_64 GNU/Linux

x86_64表示64位机器

uname -a
Linux pmx0**.**.**    2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005i686i686 i386 GNU/Linux

i686表示32位机器

i686 只是i386的一个子集,支持的cpu从Pentium 2 (686)开始,之前的型号不支持.

如果是32bit版本
./configure \
--prefix=/opt/phpfcgi-5.4.45 \
......省略
--with-libdir=lib \

如果是64bit版本
./configure \
--prefix=/opt/phpfcgi-5.4.45 \
......省略
--with-libdir=lib64 \


3、没有lib64目录
[root@server1 php-5.4.45]# ll /usr/lib/libc-client.so
lrwxrwxrwx 1 root root 19 Dec  7 21:09 /usr/lib/libc-client.so -> libc-client.so.2007
[root@server1 php-5.4.45]#
updatedb
locate libc-client
locate 找到libc-client 位置后用ln -s 命令做个软连接到/usr/lib/

假设在32bit上没有lib64,则
# ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so
也是一种便捷方式。

Tags: ,