Updating Ghostscript on CentOS 5.4 (ghostscript 8.70) (the remix)

A while back I wrote an article on updating to ghostscript 8.63 on CentOS 5.2. I received a fair amount of email and comments on the topic ranging from “thanks” to “you don’t know what your talking about!” I thought I would update the original post to include the latest release of ghostscript (8.7) as well as answer and respond to the best question / statement in the comments… “how do you do that and can you post the SRPMS?” The answer is, yes, here is how I do it and “yes” I’ll post the SRPMs (or more appropriately where I get them).

First, you have to have the latest version of the build environment as well as some prerequisites for building GhostScript:

yum --enablerepo remi groupinstall "Development Tools"
yum --enablerepo remi install libjpeg-devel libXt-devel libpng-devel gtk2-devel glib2-devel gnutls-devel libxml2-devel libtiff-devel cups-devel libtool jasper-devel

(you will note here I use the REMI repo)

Next, I obtain the SRPM files from rpmfind.net and ghostscript-fonts from the centos repo:

wget ftp://195.220.108.108/linux/fedora/development/source/SRPMS/ghostscript-8.70-3.fc13.src.rpm

wget http://mirror.centos.org/centos/5.4/os/SRPMS/ghostscript-fonts-5.50-13.1.1.src.rpm

Now, I build them using RPM (rpmbuild):

rpmbuild --rebuild ghostscript-8.70-3.fc13.src.rpm
rpmbuild --rebuild ghostscript-8.70-1.fc10.src.rpm

… and that is how I do it! If you are feeling exceptionally lazy and have some inherent trust for my builds in x86_64… here they are:

rpm -Uvh http://chrisschuld.com/centos54/ghostscript-8.70-1.x86_64.rpm http://chrisschuld.com/centos54/ghostscript-fonts-5.50-13.1.1.noarch.rpm http://chrisschuld.com/centos54/ghostscript-gtk-8.70-1.x86_64.rpm

14 thoughts on “Updating Ghostscript on CentOS 5.4 (ghostscript 8.70) (the remix)

  1. Pingback: Updating Ghostscript on CentOS 5.2 (ghostscript 8.63) | Chris Schuld's Blog

  2. Hi,
    Thanks for your post. I’m trying to upgrade ghostscript because it fails on some of our pdf files. However, when I try this command:

    sudo rpmbuild –rebuild ghostscript-8.70-6.fc13.src.rpm

    I get the following errors, do you have any ideas? Thanks!

    Installing ghostscript-8.70-6.fc13.src.rpm
    warning: user mockbuild does not exist – using root
    warning: group mockbuild does not exist – using root
    error: unpacking of archive failed on file /usr/src/redhat/SOURCES/CIDFnmap;4b60a5ab: cpio: MD5 sum mismatch
    error: ghostscript-8.70-6.fc13.src.rpm cannot be installed

  3. Ryan, the reason you couldn’t rebuild the RPM is that Fedora 11 and 12 have moved on to a newer hash library in RPM, and no longer use MD5 checksums.

    Here’s what I did on my system:

    1) Downloaded the latest ghostscript SRPM from Fedora development (rawhide)
    2) run “rpm2cpio ghostscript-8.70-2.fc13.src.rpm | cpio -dimv” to extract the files from the SRPM
    3) Put all the resulting files in ~/rpmbuild/SOURCES, except for ghostscript.spec, which goes in ~/rpmbuild/SPECS. (You’re not building RPMs are root, are you? If so, you should go read up on how to build RPMs safely.)
    4) Go the SPECS directory, and run “rpmbuild -ba ghostscript.spec”
    5) Find the SRPM and RPMs in ~/rpmbuild/RPMS
    6) Enjoy!

  4. I also needed to install the urw-fonts package from Fedora (urw-fonts-2.4-9.fc13.src.rpm) to fix missing NimbusSanL-Regu errors (the previous urw-fonts package has the name NimbusSansL-Regu for the font).

  5. Thank for this. I was able to follow Anonymous Helper’s instructions to get the RPMs built. A few notes, though:

    - I had to set my ~/.rpmmacros file to include the line:
    %_topdir /home//rpmbuild

    Also, the tarball from the extracted RPM was in .xv format, which meant installing .xv and acquiring a new version of tar (1.22) in order to extract it. I was able to get the new version of tar from here: http://blackopsoft.com/

    After that, I was able to rebuild and install the RPMs. Whew!

  6. Hi, Thank you for this.

    I’ve tryed follow ur explaing but I don’t know how to still…..

    Can I update ghostscript as source file?

  7. Hi,

    I just noticed that the http://blackopsoft.com/ repo mentioned by kurt has pretty recent ghostscript and imagemagik rpms build already which would probably be just fine for most people.

    Thanks to all who contributed to this it’s helped me out.

  8. Hi, I try to follow ANONYMOUS HELPER’s instruction to build RPM. Unfortunately, after a long run there is nothing in ~/rpmbuild/RPMS/noarch/.

    Because there is no error message when done. I don’t know what is going wrong. I have built a MS TrueType Core Fonts RPM before and everything works fine. Can anyone tell me what should I do to find out what is missing? Thank you.

  9. Just wanted to say thanks very much for the 5.4 x64 build for lazy people – it worked perfectly on RHEL5.5 and fixed an issue we were having with multiple page PDF files on ghostscript 8 :D

    You’re awesome.

  10. Hi thanks for your post, i have centOS 5.5 i tried your tuto on my installation and i get a lot of errors can you guide me through this task please i’m totally lost

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>