MacOS Leopard 上安装 ImageMagick 和RMagick

[b]Step 1: Install MacPorts[/b]

Go to the Installing MacPorts web page and follow the instructions there to install MacPorts. Note that you must install the XCode Tools, X11.app, and the X11 SDK.

The remainder of these instructions assume that you installed MacPorts using all the defaults.

[b]Step 2: Install ImageMagick and its delegate libraries[/b]

If you have not already done so, start the Terminal application.

Enter this command in a Terminal window.

sudo port install tiff -macosx imagemagick +q8 +gs +wmf

You'll be prompted for your password. Be patient. Depending on your Internet access speed and the speed of your CPU this could take an hour or more.

This command installs support for JPEG, TIFF, WMF, PDF, and PNG images, and for Postscript and TrueType fonts.

[b]Step 3: Install RMagick[/b]

Enter this command in a Terminal window.

sudo gem install rmagick

Again, you'll be prompted for your password. You'll see this output:

Bulk updating Gem source index for: http://gems.rubyforge.org
Building native extensions. This could take a while...
Successfully installed rmagick-X.Y.Z
Be patient. A lot of time will pass with no output from the gem command. The "Successfully installed" message does not mean that RMagick was successfully installed. The RMagick installation can encounter error conditions that gem can't detect. The following irb session is a better indicator of a successful install. (Of course the version numbers in the message may vary from what is shown here, depending on what versions of the software are currently available.)

$ irb -rubygems -r RMagick
irb(main):001:0> puts Magick::Long_version
This is RMagick 1.15.3 ($Date: 2007/01/20 15:45:29 $) Copyright (C) 2007 by Timothy P. Hunter
Built with ImageMagick 6.3.2 02/23/07 Q8 http://www.imagemagick.org
Built for ruby 1.8.5 (2006-12-25 patchlevel 12) [powerpc-darwin8.0.0]
Web page: http://rmagick.rubyforge.org
Email: rmagick@rubyforge.org
=> nil

If you're using the version of Ruby that comes with Leopard, the RMagick HTML documentation is automatically installed at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/share/RMagick/index.html. If you're using your own installation of Ruby, the RMagick HTML documentation is automatically installed at $PREFIX/share/RMagick/index.html.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值