[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.
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.
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.)
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.
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 +wmfYou'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 rmagickAgain, 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
=> nilIf 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.
本文提供了一步一步的指南,教你如何在Mac上安装MacPorts、ImageMagick及其委托库,以及如何安装RMagick。安装过程中会用到Terminal应用,并涉及XCode Tools、X11.app等组件。

被折叠的 条评论
为什么被折叠?



