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

  • 相关阅读:
    Spring Boot WebFlux-02——WebFlux Web CRUD 实践
    Struts2
    spring04
    spring03
    spring02
    jQuery04
    spring01
    jQuery03
    Linux学习笔记《六》
    请求报错:“应以Content-Type: application/x-www-form-urlencoded为请求类型,在form表单中提交登录信息。"
  • 原文地址:https://www.cnblogs.com/wusong/p/4694938.html
Copyright © 2011-2022 走看看