您的位置:首页 > 运维架构 > Linux

GraphicsMagick在Linux环境的安装【jpeg failed tests处理】

2017-03-14 11:14 471 查看
GraphicsMagick 在linux下的安装步骤在网上随便可以搜到,
本人在按照网上安装步骤一步一步操作之后完,执行配置命令时提示jpeg
 failed tests也就是安装的GM不支持jpeg,在网上找了半天没有找到这种问题的处理办法,最后在一国外网站查到这种问题的处理办法,如理方法如下:
执行图片中红框标出的命令即可成功处理该问题。

jpeg failed tests处理办法

JPEG v1 --with-jpeg=yes no (failed tests)

PNG --with-png=yes no (failed tests)



GraphicsMagick 安装
下载软件:download:ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.22.tar.gz
#如果需要支持JPEG则需要执行这一步,建议执行。(JPEG
v1           --with-jpeg=yes               yes )
yum install -y  libjpeg-devel libjpeg
安装软件:
tar xf GraphicsMagick-1.3.22.tar.gz 
cd GraphicsMagick-1.3.22
./configure --prefix=/usr/local/GraphicsMagick-1.3.22 --with-quantum-depth=16   --enable-shared --enable-static
make
make install
至此 安装完毕,可以测试看看了。
#############################下面是 ./configure 后的返回信息,如果需要什么在自己补充吧这里我就需要这些就ok了。##########################
GraphicsMagick is configured as follows. Please verify that thisconfiguration matches your
expectations.
Host system type : x86_64-unknown-Linux-gnuBuild
system type : x86_64-unknown-linux-gnu
Option            Configure option              Configured value-----------------------------------------------------------------Shared
libraries  --enable-shared=no            noStatic libraries  --enable-static=yes           yesGNU ld            --with-gnu-ld=yes             yesQuantum depth     --with-quantum-depth=8        8Modules           --with-modules=no             no
Delegate Configuration:BZLIB             --with-bzlib=yes              yesDPS              
--with-dps=yes                noFlashPIX          --with-fpx=no                 noFreeType 2.0      --with-ttf=yes                yesGhostscript       None                          gs (8.15.2)Ghostscript fonts --with-gs-font-dir=default    /usr/share/fonts/default/Type1/Ghostscript
lib   --with-gslib=no               noJBIG              --with-jbig=yes               noJPEG v1           --with-jpeg=yes               yesJPEG-2000         --with-jp2=yes                noLCMS v1           --with-lcms=yes               noLCMS v2          
--with-lcms2=yes              noLZMA              --with-lzma=yes               noMagick++          --with-magick-plus-plus=yes   yesPERL              --with-perl=no                noPNG               --with-png=yes                yes (-lpng12)TIFF             
--with-tiff=yes               noTRIO              --with-trio=yes               noWindows fonts     --with-windows-font-dir=      noneWMF               --with-wmf=yes                noX11               --with-x=                     yesXML               --with-xml=yes               
yesZLIB              --with-zlib=yes               yes
X11 Configuration:  X_CFLAGS     =   X_PRE_LIBS   =   X_LIBS       =   X_EXTRA_LIBS =
Options used to compile and link:  CC       = gcc -std=gnu99  CFLAGS   = -fopenmp -g -O2 -Wall
-pthread  CPPFLAGS = -I/usr/include/freetype2 -I/usr/include/libxml2  CXX      = g++  CXXFLAGS = -pthread  DEFS     = -DHAVE_CONFIG_H  LDFLAGS  = -L/usr/lib -L/usr/lib  LIBS     = -lfreetype -ljpeg -lpng12 -lXext -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lpthread
#############################################################################################
测试:
gm  convert 111.jpg 222.png
gm  convert 111.jpg -resize 100x100 out.jpg
如果报错:
1)如果configure提示“configure: error: libltdl is required for modules build”,则yum install libtool-ltdl libtool-ltdl-devel

注:
jpegfailed tests处理办法
JPEG v1 --with-jpeg=yes no (failed tests)
PNG --with-png=yes no (failed tests)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息