Linux Install Memo

サーバー管理者によるLinux関連ソフトのインストールメモ

Home » □ImageMagick でらくらくお絵かき!?

□ImageMagick でらくらくお絵かき!?

参考URL:
http://www.imagemagick.org/

GD 等のライブラリを入れたら、ImageMagick を入れるとお絵かきが楽?
になるかもしれません。CGIで対応しているものも時々ありますので必要
が無ければ入れる必要はありませんが。

たしか一時期版権だか特許権だかで色々といわれた気がしましたけど、
まぁとりあえずインストールしてみましょう。 INSTALL-unix.txt を
見てみると gzip が必須のようですが、普通はあるでしょう。

tar xvzf package/ImageMagick-6.4.8-3.tar.gz
cd ImageMagick-6.4.8-3/

もしくは

tar xvzf package/ImageMagick-5.5.7-10.tar.gz
cd ImageMagick-5.5.7/

./configure –prefix=/usr

とすると、こんなんオプションにしましたけどー、というのが表示され
ますので、入っているのになぁ、という場合には ./configure のオプ
ションをチェックしてみましょう。

ちなみにXが入っていない場合には

./configure –without-x

でないとどこかでエラーになるかもしれません。

>?????????????????? Option??????????????????????? Value
> ——————————————————————————-
> Shared libraries? –enable-shared=yes?????????? yes
> Static libraries? –enable-static=yes?????????? yes
> Module support??? –with-modules=yes??????????? yes
> GNU ld??????????? –with-gnu-ld=yes???????????????????? yes
> Quantum depth???? –with-quantum-depth=16?????? 16
> High Dynamic Range Imagery
>?????????????????? –enable-hdri=no????????????? no
>
> Delegate Configuration:
> BZLIB???????????? –with-bzlib=yes????????????? yes
> Autotrace???????? –with-autotrace=no?????????? no
> DJVU????????????? –with-djvu=yes?????????????? no
> DPS?????????????? –with-dps=yes??????????????? no
> FlashPIX????????? –with-fpx=yes??????????????? no
> FontConfig??????? –with-fontconfig=yes???????? yes
> FreeType????????? –with-freetype=yes?????????? yes
> GhostPCL????????? None????????????????????????? pcl6 (unknown)
> GhostXPS????????? None????????????????????????? gxps (unknown)
> Ghostscript?????? None????????????????????????? gs (7.07.1)
> result_ghostscript_font_dir=’none’
> Ghostscript fonts –with-gs-font-dir=default
> Ghostscript lib?? –with-gslib=yes????????????? no
> Graphviz????????? –with-gvc=yes??????????????? no
> JBIG????????????? –with-jbig=yes?????????????? no
> JPEG v1?????????? –with-jpeg=yes?????????????? yes
> JPEG-2000???????? –with-jp2=yes??????????????? no
> LCMS????????????? –with-lcms=yes?????????????? no
> LQR?????????????? –with-lqr=yes??????????????? no
> Magick++????????? –with-magick-plus-plus=yes?? yes
> OpenEXR?????????? –with-openexr=yes??????????? no
> PERL????????????? –with-perl=yes?????????????? /usr/bin/perl
> PNG?????????????? –with-png=yes??????????????? yes
> RSVG????????????? –with-rsvg=yes?????????????? yes
> TIFF????????????? –with-tiff=yes?????????????? yes
> Windows fonts???? –with-windows-font-dir=
> WMF?????????????? –with-wmf=yes??????????????? no
> X11?????????????? –with-x=???????????????????????????? yes
> XML?????????????? –with-xml=yes??????????????? yes
> ZLIB????????????? –with-zlib=yes?????????????? yes
>
> X11 Configuration:
>?????? X_CFLAGS??????? =
>?????? X_PRE_LIBS????? = -lSM -lICE
>?????? X_LIBS????????? = -L/usr/X11/lib
>?????? X_EXTRA_LIBS??? =
>
> Options used to compile and link:
>?? PREFIX????????? = /usr
>?? EXEC-PREFIX???? = /usr
>?? VERSION???????? = 6.4.8
>?? CC????????????? = gcc -std=gnu99
>?? CFLAGS????????? = -g -O2 -Wall -W -pthread
>?? MAGICK_CFLAGS?? = -g -O2 -Wall -W -pthread
>?? CPPFLAGS??????? = -I/usr/include/ImageMagick
>?? PCFLAGS???????? =
>?? DEFS??????????? = -DHAVE_CONFIG_H
>?? LDFLAGS???????? = -L/usr/X11/lib -lfreetype -lz
>?? MAGICK_LDFLAGS? = -L/usr/lib -L/usr/X11/lib -lfreetype -lz
>?? LIBS??????????? = -lMagickCore -ltiff -lfreetype -ljpeg -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lpthread
>?? CXX???????????? = g++
>?? CXXFLAGS??????? = -g -O2 -Wall -W -pthread

そしたら、

make

して、エラーがなければ以前のバージョンを make uninstall してから

make install

で終わりです。

/usr/bin/convert logo: logo.gif

としてエラーなくコンバートできるか試してみましょう。

補足:ApacheでlibWandエラーが出る場合

インストールすると suexec が

> suexec: error while loading shared libraries: libWand.so.6: cannot open shared object file: No such file or directory

というエラーを吐き出してCGIが正常に動かないことがある。
こんなときには慌てずに Apache を再インストールすればOK。

補足:libfontconfig.la が見当たらないといわれる場合

/usr/X11R6/lib/libfontconfig.la

がないといわれても

/usr/lib/libfontconfig.la

にあるなら、この場合はシンボリックリンク貼っちゃった方が早いかも。

ln -s /usr/lib/libfontconfig.la /usr/X11R6/lib/libfontconfig.la

Name of author

Name: admin

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA