• 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

  • 相关阅读:
    AI编辑SVG格式的相关问题
    HTML里的id等属性命名需要注意
    canvas绘图动画细节
    触控获取坐标判断滑动方向
    CSS3卡片旋转效果
    使用CURL下载远程文件保存到服务器
    微信JS-SDK应用DEMO
    布局转换:文档流->绝对定位
    ThinkPHP缓存微信公众号access_token
    JAVA JSP笔记
  • 原文地址:https://www.cnblogs.com/wusong/p/4694938.html
Copyright © 2020-2023  润新知