折腾了一晚上,终于找到"libgomp: Thread creation failed: Resource temporarily unavailable" 错误的原因,编译ImageMagick时--without-threads即可 最新版本: ImageMagick:ftp://ftp.imagemagick.org/pub/ImageMagick/ imagick:http://pecl.php.net/package/imagick 代码: ########安装ImageMagick######## wget -c http://www.imagemagick.org/download/ImageMagick.tar.gz tar zxvf ImageMagick.tar.gz cd ImageMagick-7.0.4-7/ ./configure --prefix=/usr/local/imagemagick --without-threads make && make install cd ../ yum install ImageMagick-devel ln -s /usr/local/imagemagick/include/ImageMagick-7 /usr/local/imagemagick/include/ImageMagick ########安装re2c######## wget https://sourceforge.net/projects/re2c/files/0.16/re2c-0.16.tar.gz tar -zxvf re2c-0.16.tar.gz cd re2c-0.16 ./configure && make && make install cd ../ ########安装PHP扩展:imagick######## wget -c http://pecl.php.net/get/imagick-3.4.3.tgz tar zxvf imagick-3.4.3.tgz cd imagick-3.4.3/ /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/imagemagick make && make install cd ../ ########配置php.ini######## cat >>/usr/local/php/etc/php.ini<<EOF [ImageMagick] extension = "imagick.so" EOF ########完成######## 重启php-fpm或apache。 /etc/init.d/php-fpm restart /etc/init.d/httpd -k restart 再执行一下:ldconfig ,重新加载一些链接库。