【yum安装】
yum install libXpm libXpm-devel
找到xpm库的安装位置:
参考:https://bugs.php.net/bug.php?id=66716
参考:https://blog.csdn.net/shudaqi2010/article/details/39018545
参考:https://stackoverflow.com/questions/19895312/php-make-fails-with-error-undefined-symbols-xpmlibraryversion
rpm -ql libXpm
输出:
/usr/lib64/libXpm.so.4 /usr/lib64/libXpm.so.4.11.0 /usr/share/doc/libXpm-3.5.12 /usr/share/doc/libXpm-3.5.12/AUTHORS /usr/share/doc/libXpm-3.5.12/COPYING /usr/share/doc/libXpm-3.5.12/ChangeLog
环境参数:
export XPM_CFLAGS="-I/usr/include/X11" XPM_LIBS="-L/usr/lib64 -lXpm"
【从源码编译安装】
参考:https://www.freebsd.org/doc/zh_CN/books/porters-handbook/using-x11.html
在 Ports 套件中提供的 X11 实现是 X.Org。 如果您的应用程序用到了 X 组件, 则应将 USE_XORG 设为所需要的那些组件。 目前可用的组件包括:xpm 。
下载:https://www.x.org/releases/individual/lib/
wget https://www.x.org/releases/individual/lib/libXpm-3.5.12.tar.bz2 && tar -jxvf libXpm-3.5.12.tar.bz2 && cd libXpm-3.5.12 ./configure --prefix=/usr/local/libXpm make && make install
输出:
... /usr/bin/mkdir -p '/usr/local/libXpm/include' /usr/bin/mkdir -p '/usr/local/libXpm/include/X11' ... Libraries have been installed in: /usr/local/libXpm/lib ...
环境参数:
export XPM_CFLAGS="-I/usr/local/libXpm/include" XPM_LIBS="-L/usr/local/libXpm/lib -lXpm"