我的安装过程比较散乱,事后想来还是直接从source code编译比较方便。因为有darwin ports的 帮忙,以前安装的头痛的库问题,多少可以解决不少。杂七杂八装的东西一多,难免就忘了。上次一台linux raid的机器挂掉,想google安装配置的说明,结果找到自己blog的备忘,得以节约了不少时间,顺利挂好Raid。看来这个烂笔头还是有用的!
先到 http://www.imagemagick.org/script/binary-releases.php#unix 抓了一个osx版本的binary ,直接cp /usr/local下, tar -xvzf 这个tar.gz包.然后 ln -s /usr/local/thisVersion.tar.gz ImageMagick 另外也修改了/etc/profile的配置,把imagemagick参数了路径加进去,再 chmod -R 775 ImageMagick .但是用 convert logo: logo.gif 测试有错误,原因是一些库没有装,不管了,直接用darwin ports安装
sudo port install ImageMagick
darwinports 默认安装位置在/opt/local下面,这个过程也会先装一堆库进去,装好用root测试正确,接着是perlMagic的事情.因为binary版本的imageMagick没有包含perlMagick 用cpan安装的又是6.2.4的版本,而且一堆Lib指向都有问题,编译有一大堆错误。放弃!
又去抓了一个同版本的source的tar.gz包回来。解开,其他不用,直接拿里面PerlMagick子目录用,先改MakeFile.PL文件的lib指向
'LIBS' => ['-L/opt/local/lib -L/usr/local/ImageMagick/lib -lMagick -lfreetype -lz -L/usr/X11R6/lib -lX11 -L/usr/local/lib -llcms -ltiff -lfreetype -ljpeg -lgs -lpng -lfontconfig -lwmflite -lXext -lXt -lSM -lICE -lX11 -lbz2 -lrsvg-2 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lxml2 -L/usr/lib/graphviz -lgvc -lz -lpthread -lm -lpthread'],
# etc/profile
# System-wide .profile for sh(1)
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
export MAGICK_HOME="/usr/local/ImageMagick"
export PATH
PATH="$MAGICK_HOME/bin:$PATH"
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"
export LANG=zh_CN.UTF-8
alias ls='ls -w'
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
###########################################sudo port install jpeg
sudo port install libpng
sudo port install libwmf 原来没有装
sudo port install tiff (see note below)
sudo port install lcms 原来没有装
sudo port install freetype
sudo port install ghostscript 原来没有装,这个要很久
sudo port install librsvg 过程漫长,会安装glib2 和巨大的XFree86-4.5.0 如果没装的话,xfree86没有装上,这个librsvg放弃
export CPPFLAGS=-I/opt/local/include
export LDFLAGS=-L/opt/local/lib
./configure --prefix=/opt/local --disable-static --with-modules \
--without-magick-plus-plus --with-quantum-depth=8 \
--with-gs-font-dir=/opt/local/share/ghostscript/fontsImageMagick is configured as follows. Please verify that this configuration
matches your expectations.
Host system type : powerpc-apple-darwin8.6.0
Option Value
-------------------------------------------------------------------------
Shared libraries --enable-shared=yes yes
Static libraries --enable-static=no no
Module support --with-modules=yes yes
GNU ld --with-gnu-ld=no no
Quantum depth --with-quantum-depth=8 8
Delegate Configuration:
BZLIB --with-bzlib=yes yes
DPS --with-dps=yes no (failed tests)
FlashPIX --with-fpx=no no
FontConfig --with-fontconfig=yes no
FreeType --with-freetype=yes yes
GhostPCL None pcl6 (unknown)
Ghostscript None gs (8.53)
Ghostscript fonts --with-gs-font-dir=/opt/local/share/ghostscript/fonts /opt/local/share/ghostscript/fonts/
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 yes
Magick++ --with-magick-plus-plus=no no
PERL --with-perl=yes /usr/bin/perl
PNG --with-png=yes yes
RSVG --with-rsvg=yes no
TIFF --with-tiff=yes yes
Windows fonts --with-windows-font-dir= none
WMF --with-wmf=yes yes
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/X11R6/lib
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /usr/local/ImageMagick-6.2.7-5
EXEC-PREFIX = /usr/local/ImageMagick-6.2.7-5
VERSION = 6.2.7
CC = gcc
CFLAGS = -g -O2 -Wall
CPPFLAGS = -I/usr/local/ImageMagick-6.2.7-5/include
PCFLAGS =
DEFS = -DHAVE_CONFIG_H
LDFLAGS = -L/usr/local/ImageMagick-6.2.7-5/lib -L/opt/local/lib -L/usr/X11R6/lib -L/opt/local/lib -lfreetype -lz -L/opt/local/lib
LIBS = -lMagick -llcms -ltiff -lfreetype -ljpeg -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lpthread -lm -lpthread
CXX = g++
CXXFLAGS = [technorati relative tag]
[相关内容]
由 tristones 发表于 2006年05月26日 下午10時09分