phpgd库没有安装问题确认
今天一个php开发找上门,说某台服务器gd库用不了
成都创新互联公司主营鼓楼网站建设的网络公司,主营网站建设方案,App定制开发,鼓楼h5小程序设计搭建,鼓楼网站营销推广欢迎鼓楼等地区企业咨询
看看编译用的gd库路径是/usr/local/gd
/usr/local/php/bin/php-config |grep --color=auto gd
--ldflags [ -L/usr/kerberos/lib64 -L/usr/local/lib -L/usr/local/libjpeg/lib -L/usr/local/libpng/lib -L/usr/local/freetype/lib -L/usr/local/gd/lib -L/usr/local/MySQL/lib]
--libs [-lcrypt -lz -lcrypt -lmysqlclient -lmcrypt -lltdl -lgd -lfreetype -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lrt -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -lcurl -lidn -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt ]
--configure-options [--prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=mysqlnd --with-iconv-dir=/usr/local --with-freetype-dir=/usr/local/freetype --with-jpeg-dir=/usr/local/libjpeg --with-png-dir=/usr/local/libpng --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl=/usr/local --without-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd=/usr/local/gd--enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --without-pear --enable-zip --with-bz2 --enable-calendar --enable-ftp --enable-ctype --enable-exif --disable-ipv6 --with-sqlite3 --with-gettext --disable-pdo --disable-phar]
ldd查看lib文件用的路径,发现gd 用的lib是
ldd /usr/local/php/bin/php|grep jp
libjpeg.so.7 => /usr/local/libjpeg/lib/libjpeg.so.7 (0x00002b5541e18000)
libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00002b5542f1c000)
ldd /usr/local/php/bin/php|grep gd
libgd.so.2 => /usr/lib64/libgd.so.2 (0x00002b8dc7002000)
md5和ll查看是否为同一个文件
md5sum /usr/lib64/libgd.so.2
a4d9246143fc28542bea0774c073c863 /usr/lib64/libgd.so.2
ll /usr/lib64/libgd.so.2
lrwxrwxrwx 1 root root 14 Jul 31 2014 /usr/lib64/libgd.so.2 -> libgd.so.2.0.0
ll /usr/local/gd/lib/libgd.
libgd.a libgd.la libgd.so libgd.so.2 libgd.so.2.0.0
ll /usr/local/gd/lib/libgd.so.2
lrwxrwxrwx 1 root root 14 May 15 10:20 /usr/local/gd/lib/libgd.so.2 -> libgd.so.2.0.0
md5sum /usr/local/gd/lib/libgd.so.2
cdb329af5b013d40d79f29f02ba1b275 /usr/local/gd/lib/libgd.so.2
明显不一致,所以只能重新编译php
网站名称:phpgd库没有安装问题确认
网站URL:http://scyanting.com/article/iesjee.html