{"id":6816,"date":"2014-04-23T08:09:21","date_gmt":"2014-04-23T08:09:21","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/problem-installing-rmagick-rubygem-on-centos-5-collection-of-common-programming-errors\/"},"modified":"2014-04-23T08:09:21","modified_gmt":"2014-04-23T08:09:21","slug":"problem-installing-rmagick-rubygem-on-centos-5-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/problem-installing-rmagick-rubygem-on-centos-5-collection-of-common-programming-errors\/","title":{"rendered":"Problem installing RMagick rubygem on Centos 5-Collection of common programming errors"},"content":{"rendered":"<p>Centos 5.5 the ImageMagick is legacy, so install from source to can use the rmagick.<\/p>\n<p>Get the source RPM<\/p>\n<pre><code>wget ftp:\/\/ftp.kddlabs.co.jp\/graphics\/ImageMagick\/linux\/SRPMS\/ImageMagick.src.rpm\nrpm -ivh --nomd5 ImageMagick.src.rpm\ncd \/usr\/src\/redhat\/SPECS\nrpmbuild -ba ImageMagick.spec\n<\/code><\/pre>\n<p>Probably you get dependence error for:<\/p>\n<ul>\n<li>perl-devel<\/li>\n<li>jasper-devel<\/li>\n<li>djvulibre-devel<\/li>\n<\/ul>\n<p>Add to your \/etc\/yum.repos.d\/dag.repo<\/p>\n<pre><code>[dag]\nname=Dag RPM Repository for CentOS5\nbaseurl=http:\/\/ftp.riken.jp\/Linux\/dag\/redhat\/el5\/en\/$basearch\/dag\/\nenabled=0\ngpgcheck=1\n<\/code><\/pre>\n<p>Then import the GPG key and install the djvulibre-devel<\/p>\n<pre><code>rpm --import http:\/\/ftp.riken.jp\/Linux\/dag\/RPM-GPG-KEY.dag.txt\nyum --enablerepo=dag install djvulibre-devel\n<\/code><\/pre>\n<p>Then check if you can make the RPM:<\/p>\n<pre><code>rpmbuild -ba ImageMagick.spec\n<\/code><\/pre>\n<p>If you get the perl-devel dependency error.<\/p>\n<pre><code>yum install perl\n<\/code><\/pre>\n<p>Then edit the ImageMagick.spec and replace &#8220;<strong>perl-devel<\/strong>&#8221; for &#8220;<strong>perl<\/strong>&#8220;, save and rpmbuild again.<\/p>\n<pre><code>rpmbuild -ba ImageMagick.spec\n<\/code><\/pre>\n<p>So install the the other dependences:<\/p>\n<pre><code>yum install freetype\nyum install gd-devel\nwget http:\/\/www.osresources.com\/files\/centos-windows-fonts\/msfonts.tbz\nmkdir \/usr\/share\/fonts\/default\/TrueType\ntar xvjpf msfonts.tbz -C \/usr\/share\/fonts\/default\/TrueType\/\n<\/code><\/pre>\n<p>Let&#8217;s install it:<\/p>\n<pre><code>cd \/usr\/src\/redhat\/RPMS\/i386\nrpm -Uvh ImageMagick-*\n<\/code><\/pre>\n<p>After all you can test if your RMagick is installed:<\/p>\n<pre><code>ruby -rrubygems -e \"require 'RMagick'; puts Magick::Long_version;\"\n<\/code><\/pre>\n<p><em>Based on:<\/em><\/p>\n<p>hi.baidu.com\/rainchen\/blog\/item\/089ef7364497de320a55a9a3.html<\/p>\n<p>mobile-dev.izanagi-izanami.net\/blog\/?p=48<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Centos 5.5 the ImageMagick is legacy, so install from source to can use the rmagick. Get the source RPM wget ftp:\/\/ftp.kddlabs.co.jp\/graphics\/ImageMagick\/linux\/SRPMS\/ImageMagick.src.rpm rpm -ivh &#8211;nomd5 ImageMagick.src.rpm cd \/usr\/src\/redhat\/SPECS rpmbuild -ba ImageMagick.spec Probably you get dependence error for: perl-devel jasper-devel djvulibre-devel Add to your \/etc\/yum.repos.d\/dag.repo [dag] name=Dag RPM Repository for CentOS5 baseurl=http:\/\/ftp.riken.jp\/Linux\/dag\/redhat\/el5\/en\/$basearch\/dag\/ enabled=0 gpgcheck=1 Then import the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6816","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6816"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6816\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}