在CentOS 6.3上安装最近的ImageMagick

Modified on: Wed, 03 Jul 2019 13:00:02 +0800

我正在尝试在CentOS 6.3 x86_64服务器上安装最新版本的ImageMagick。首先,我从ImageMagick网站下载 RPM试图安装它。由于缺少依赖性而失败:

error: Failed dependencies:
    libHalf.so.4()(64bit) is needed by ImageMagick-6.8.0-4.x86_64
    libIex.so.4()(64bit) is needed by ImageMagick-6.8.0-4.x86_64
    libIlmImf.so.4()(64bit) is needed by ImageMagick-6.8.0-4.x86_64
    libImath.so.4()(64bit) is needed by ImageMagick-6.8.0-4.x86_64
    libltdl.so.3()(64bit) is needed by ImageMagick-6.8.0-4.x86_64

我安装了libtool-ltdl,但其中包括libltdl.so.7,而不是libltdl.so.4。我对libHalflibIexlibIlmImflibImath有类似的问题。通常,您可以安装OpenEXR来获取这些依赖项。不幸的是,CentOS 6.3包括OpenEXR 1.6.1,其中包括ilmbase-devel 1.0.1。而ilmbase-devel的发布包括这些依赖项的更新版本:

  • libHalf.so.6
  • libIex.so.6
  • libIlmImf.so.6
  • libImath.so.6

我接下来尝试按照说明安装ImageMagick来源。也没有运气。我收到了构建错误:

RPM build errors:
  File not found by glob: /home/sean/rpmbuild/BUILDROOT/ImageMagick-6.8.0-4.x86_64/usr/lib64/ImageMagick-6.8.0/modules-Q16/coders/djvu.*

我甚至重新运行configure以明确排除djvu,我仍然得到相同的错误。此时,我正在拔头发。

在CentOS 6.3上安装相对较新版本的ImageMagick(> 6.7)的最简单方法是什么?有人在某处提供带有依赖的RPM 吗?

最佳答案

你不应该遇到这些问题......我试图搜索当前版本的ImageMagick。我发现没有任何奇怪的先决条件......

所以我开始运行CentOS 6.3虚拟机并构建了最新的ImageMagick SRPM文件 。您可能还想启用RepoForge存储库(以前称为RPMForge)。构建顺利进行!

系统信息:

[root@MDMarra ~]# uname -a
Linux MDMarra.localdomain 2.6.32-279.11.1.el6.x86_64 #1 SMP Tue Oct 16 15:57:10 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

[root@MDMarra ~]# cat /etc/issue
CentOS release 6.3 (Final)
Kernel \r on an \m

[root@MDMarra ~]# yum repolist
repo id                                       repo name                                                     status
base                                          CentOS-6 - Base                                                 6346
extras                                        CentOS-6 - Extras                                                  6
rpmforge                                      Red Hat Enterprise 6 - RPMforge.net - dag                       4453
update                                        CentOS-6 - Updates                                               820

开始安装:

[root@MDMarra ~]# wget http://imagemagick.mirrorcatalogs.com/linux/SRPMS/ImageMagick-6.8.0-4.src.rpm
[root@MDMarra ~]# yum install bzip2-devel freetype-devel libjpeg-devel libpng-devel libtiff-devel giflib-devel zlib-devel ghostscript-devel djvulibre-devel libwmf-devel jasper-devel libtool-ltdl-devel libX11-devel libXext-devel libXt-devel lcms-devel libxml2-devel librsvg2-devel OpenEXR-devel
[root@MDMarra ~]# rpmbuild --rebuild ImageMagick-6.8.0-4.src.rpm

生成了这些文件:

Processing files: ImageMagick-debuginfo-6.8.0-4.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/ImageMagick-6.8.0-4.x86_64
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-6.8.0-4.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-devel-6.8.0-4.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-djvu-6.8.0-4.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-doc-6.8.0-4.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-perl-6.8.0-4.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-c++-6.8.0-4.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-c++-devel-6.8.0-4.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/ImageMagick-debuginfo-6.8.0-4.x86_64.rpm

安装包:

rpm -ivh /root/rpmbuild/RPMS/x86_64/ImageMagick-6.8.0-4.x86_64.rpm 

检查已安装的二进制文件:

[root@MDMarra ~]# rpm -qlp /root/rpmbuild/RPMS/x86_64/ImageMagick-6.8.0-4.x86_64.rpm| grep bin
/usr/bin/animate
/usr/bin/compare
/usr/bin/composite
/usr/bin/conjure
/usr/bin/convert
/usr/bin/display
/usr/bin/identify
/usr/bin/import
/usr/bin/mogrify
/usr/bin/montage
/usr/bin/stream

检查新安装的软件包版本号:

[root@MDMarra ~]# /usr/bin/convert -version
Version: ImageMagick 6.8.0-4 2012-11-07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP    

享受!!

作者:,ewwhite

相关问答

添加新评论