zoukankan      html  css  js  c++  java
  • error: libXpm.(a|so)

    centos 6.5 

    安装php时老是报错,找了很久答案都是千篇一律且不起作用,最后找到一个答案,特记录在此

    脚本:

    tar zxvf php-5.3.28.tar.gz && cd php-5.3.28

    #拷贝
    cp /usr/local/mysql/lib/libmysql* /usr/lib64/

    ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir=/usr/ --with-xpm-dir=/usr --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-mbstring --with-mcrypt --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-fpm --with-pdo-mysql=/usr/local/mysql --with-gd --with-gettext --with-snmp --enable-mbstring

    报错:

    configure: error: libXpm.(a|so) not found.

    解决方法:

    1,按网络上说的执行yum -y install libXpm-devel,表示最新版本已存在,无需安装。

    2,查找usr/lib,根本就是没有libXpm.(a|so) 文件,也没有所谓的/usr/lib/x86_64-linux-gnu目录

    3,查找usr/lib64,终于看到好多libxpm文件。于是软链接 ln -s  /usr/lib64/libXpm.so*   /usr/lib/

    再执行,搞定。

    特别感谢http://bbs.chinaunix.net/thread-3748557-1-1.html

    其实原因:
        configure一般的搜索编译路径为/usr/lib/下,因为php默认就在/usr/lib/下找相关库文件  
             linkto: http://blog.csdn.net/buutterfly/article/details/5630203

        so, 
            注: 主机是x64平台,

           ln -s  /usr/lib64/libXpm.so*   /usr/lib/

           并且编译时指定,  --with-xpm-dir=/usr/lib64/x11

    注意我的编译时指定是--with-xpm-dir=/usr/lib64/x11

  • 相关阅读:
    hdu 2485 Destroying the bus stations 迭代加深搜索
    hdu 2487 Ugly Windows 模拟
    hdu 2492 Ping pong 线段树
    hdu 1059 Dividing 多重背包
    hdu 3315 My Brute 费用流,费用最小且代价最小
    第四天 下载网络图片显示
    第三天 单元测试和数据库操作
    第二天 布局文件
    第一天 安卓简介
    Android 获取存储空间
  • 原文地址:https://www.cnblogs.com/wusong/p/4694938.html
Copyright © 2011-2022 走看看