Chris Schuld's Blog

personal musings on the composition of software

Written By: Chris Schuld Monday, January 4th, 2010

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
Categories: Linux

13 Responses to " Updating Ghostscript on CentOS 5.4 (ghostscript 8.70) (the remix) "

  1. Ryan Grow says:

    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

  2. Thanks so much for this.
    I had to search around the French Repo “Remi” for this page, others may find it useful to go straight here: http://blog.famillecollet.com/pages/Config-en

    Installing now. Thanks!

  3. Anonymous Helper says:

    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. Had to use these RPM’s again and struggled with the notes I’d made.
    The remi repo isn’t serving “jasper-devel” any more.

    My solution was:
    $ yum install freeglut
    $ rpm -Uvh ftp://ftp.pbone.net/mirror/www.sourcemirrors.org/scotth/centos/5/x86_64/jasper-1.900.1-2.el5.x86_64.rpm

    Then the x64 RPM’s installed fine.

    Thanks again.

  5. Anonymous Helper 2 says:

    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).

  6. Kurt Nordstrom says:

    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!

  7. Kurt Nordstrom says:

    Er, that ~/rpmmacros file line should be: %_topdir /home/my_username_here/rpmbuild

  8. ryan says:

    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?

  9. steve says:

    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.

  10. Nagame says:

    Hi, Thank you for this.

    I’m a beginner and I search a build for i386
    could you recompile for i386?

  11. Mickey says:

    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.

  12. Paul says:

    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.

  1. [...] PLEASE NOTE: I have posted an update for CentOS5.4 and GhostScript 8.70! [...]

Leave a Reply

About Chris

Chris Schuld

Thank you for visiting my website. I use this site for a myriad of things: maintaining software I have open sourced, connecting with my readers and friends and documenting all of this little things "I wished I would have written down." You can read more about me or contact me.


thanks for visiting... happy coding

Recent Comments