1. 安装imagemagick
sudo apt-get install imagemagick
运行:convert -version
如果显示以下:
Version: ImageMagick 6.5.7-8 2010-12-02 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: OpenMP
则表示安装正确。
具体可参考:
http://www.imagemagick.org/script/binary-releases.php#unix
rmagick安装
http://rmagick.rubyforge.org/install-faq.html
必备的:
1. GCC、make、GNU binutils
2. Ruby header files(ruby.h, etc)
If you installed Ruby by compiling the source code you already have the header files. If Ruby was pre-installed on your system, or you installed Ruby from a pre-compiled package, you may need to install the Ruby header files separately.
3. FreeTpye/Ghostscript fonts/JPEG/PNG/WMF
TIFF/Ghostscript/LCMS/libexif/libxml/the ZLIB library/the BZIP library
FreeType
下载freetype-2.4.4.tar.bz2: http://sourceforge.net/projects/freetype/files/
FreeType安装系统需有GNU Make
运行:
make -v
如已安装,会显示以下信息:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
到下载目录,解压:
tar jxvf freetype-2.4.4.tar.bz2
cd freetype-2.4.4/
./configure
make
Ghostscript fonts
下载:ftp://ftp.imagemagick.org/pub/ImageMagick/delegates/ghostscript-fonts-std-8.11.tar.gz
解压:tar xzvf ghostscript-fonts-std-8.11.tar.gz
解压后文件在目录fonts中
sudo mkdir /usr/share/ghostscript/fonts
移动
sudo mv fonts/* /usr/share/ghostscript/fonts
************************************************************************
装了一半没耐心,直接:
gem install rmagick
报错: Can't find Magick-config
安装:apt-get install libmagick9-dev
重新gem install rmagick --no-ri --no-rdoc
居然ok
gem install rmagick --no-ri --no-rdoc
************************************************************************
下午又找到一篇参考:
夜鸣猪: http://hlee.iteye.com/blog/748314
-------------------------------------------------------------------------------------------------------------------------------
依照如下安装Rmagick
[url=http://rmagick.rubyforge.org/install-faq.html]http://rmagick.rubyforge.org/install-faq.html[/url]
ubuntu如下:
引用
在linux下生成图片需要图片处理软件ImageMagick的Ruby语言RMagick库支持。安装RMagick最麻烦,我查了N多资料试了N次才安装成功。
1. 安装ImageMagick:sudo apt-get install imagemagick
2. 查看安装结果:dpkg -l | grep magick
3. 更新软件包列表:sudo apt-get update
4. 安装图片处理软件包libmagick9-dev:sudo apt-get install libmagick9-dev ruby1.8-dev
5. 安装接口软件包RMagick:sudo gem install rmagick
6. 说明:如果出现问题或者错误请执行下面命令:sudo apt-get remove --purge libmagick9-dev
在irb里require 'RMagick'。如果返回true,表示安装成功。
-------------------------------------------------------------------------------------------------------------------------------
ps: 原谅我的没耐心,一周都没睡好,总是睡到半夜就醒,早上起来就整个状态是迷糊的,眼睛都睁不开
-------------------------------------------------------------------------------------------------------------------------------
centos下的imageMagick的版本不是最新的
选自:http://www.21andy.com/blog/20100222/1708.html
直接使用源文件安装:
1. wget http://sourceforge.net/projects/imagemagick/files/6.6.7-sources/ImageMagick-6.6.7-tar.gz/download
2. tar -zxvf ImageMagick-6.6.7-tar.gz
3. cd ImageMagick-6.6.7
4. ./configure --prefix=/usr --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes
5. make clean
6. make & make install
7. convert -version 查看版本
sudo apt-get install imagemagick
运行:convert -version
如果显示以下:
Version: ImageMagick 6.5.7-8 2010-12-02 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: OpenMP
则表示安装正确。
具体可参考:
http://www.imagemagick.org/script/binary-releases.php#unix
rmagick安装
http://rmagick.rubyforge.org/install-faq.html
必备的:
1. GCC、make、GNU binutils
2. Ruby header files(ruby.h, etc)
If you installed Ruby by compiling the source code you already have the header files. If Ruby was pre-installed on your system, or you installed Ruby from a pre-compiled package, you may need to install the Ruby header files separately.
3. FreeTpye/Ghostscript fonts/JPEG/PNG/WMF
TIFF/Ghostscript/LCMS/libexif/libxml/the ZLIB library/the BZIP library
FreeType
下载freetype-2.4.4.tar.bz2: http://sourceforge.net/projects/freetype/files/
FreeType安装系统需有GNU Make
运行:
make -v
如已安装,会显示以下信息:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
到下载目录,解压:
tar jxvf freetype-2.4.4.tar.bz2
cd freetype-2.4.4/
./configure
make
Ghostscript fonts
下载:ftp://ftp.imagemagick.org/pub/ImageMagick/delegates/ghostscript-fonts-std-8.11.tar.gz
解压:tar xzvf ghostscript-fonts-std-8.11.tar.gz
解压后文件在目录fonts中
sudo mkdir /usr/share/ghostscript/fonts
移动
sudo mv fonts/* /usr/share/ghostscript/fonts
************************************************************************
装了一半没耐心,直接:
gem install rmagick
报错: Can't find Magick-config
安装:apt-get install libmagick9-dev
重新gem install rmagick --no-ri --no-rdoc
居然ok
gem install rmagick --no-ri --no-rdoc
************************************************************************
下午又找到一篇参考:
夜鸣猪: http://hlee.iteye.com/blog/748314
-------------------------------------------------------------------------------------------------------------------------------
依照如下安装Rmagick
[url=http://rmagick.rubyforge.org/install-faq.html]http://rmagick.rubyforge.org/install-faq.html[/url]
ubuntu如下:
引用
在linux下生成图片需要图片处理软件ImageMagick的Ruby语言RMagick库支持。安装RMagick最麻烦,我查了N多资料试了N次才安装成功。
1. 安装ImageMagick:sudo apt-get install imagemagick
2. 查看安装结果:dpkg -l | grep magick
3. 更新软件包列表:sudo apt-get update
4. 安装图片处理软件包libmagick9-dev:sudo apt-get install libmagick9-dev ruby1.8-dev
5. 安装接口软件包RMagick:sudo gem install rmagick
6. 说明:如果出现问题或者错误请执行下面命令:sudo apt-get remove --purge libmagick9-dev
在irb里require 'RMagick'。如果返回true,表示安装成功。
-------------------------------------------------------------------------------------------------------------------------------
ps: 原谅我的没耐心,一周都没睡好,总是睡到半夜就醒,早上起来就整个状态是迷糊的,眼睛都睁不开
-------------------------------------------------------------------------------------------------------------------------------
centos下的imageMagick的版本不是最新的
选自:http://www.21andy.com/blog/20100222/1708.html
直接使用源文件安装:
1. wget http://sourceforge.net/projects/imagemagick/files/6.6.7-sources/ImageMagick-6.6.7-tar.gz/download
2. tar -zxvf ImageMagick-6.6.7-tar.gz
3. cd ImageMagick-6.6.7
4. ./configure --prefix=/usr --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes
5. make clean
6. make & make install
7. convert -version 查看版本