Hi how would I go about upgrading Ghostscript to the latest version on CentOS 6.5 64bit? Yum installs version 8.7, we're having an issue with gs processes not ending so I'm hoping an upgrade may sort it out. I have a basic understanding of Linux but I've never tried to replace/upgrade with something outside the main repo.

migrated from serverfault.com May 13 '14 at 14:16

This question came from our site for system and network administrators.

  • Can you go into detail about what's failing with the existing ghostscript? – ewwhite May 12 '14 at 13:10
  • It's weird, randomly (twice in the last month) our CPU usage hits nearly 100%. Checking top I see 3-4 "gs" processes that are stuck indefinitely, using ~25% CPU each. They've been running for hours/days, this doesn't happen frequently so I'm really not sure what could cause it. – Jonathan May 12 '14 at 13:18
  • You can run an strace on the stalled processes to get some insight into what they're doing. Here are some examples. You may find that there's an external input or output or process issue. I doubt upgrading ghostscript will fix this problem. – ewwhite May 12 '14 at 13:33
  • Thanks for the link, I wish I hadn't killed them before I posted this. Next time they appear I'll try that command. – Jonathan May 12 '14 at 13:34

Just download the latest version from here and install it via source. To be safe you can yum remove the current version of Ghostscript so it doesn't have any issues with the new one. The instructions should be in the tar file but basically you are going to:

  • tar xzf ghostscript-9.14.tar.gz
  • cd ghostscript-9.14
  • ./configure
  • make
  • sudo make install

Some directions are a little different, so just make sure you read them.

  • Thanks for the reply. When I run yum remove ghostscript it wants to remove Imagemagick as well? How would I install both back? – Jonathan May 12 '14 at 13:17
  • 2
    I would not recommend replacing ghostscript outside of the distribution version because of the maintainability and upgrade concerns. In this case, it may make more sense to find the root cause of the issue. – ewwhite May 12 '14 at 13:31
  • I agree, but I doubt I'll be able to with my level of knowledge. I hate to ask this, but how horrible/possible would it be to have a script kill any Apache process that runs longer than say 10mins? – Jonathan May 12 '14 at 13:32

The source installation of ghostscript seems the way to install version 9 on a CentOS 6.x system.

The answer of Eric is a correct answer, but you have to remove(override) the "orginal" ghostscript version, which is not always the way you want to do this.

In my case, I install extra version under their own directory and use it only when I have to. To do this, you make one change (use --prefix) in the way Eric does install from the source:

 wget http://downloads.ghostscript.com/public/ghostscript-9.18.tar.gz
 tar xzf ghostscript-9.18.tar.gz
 cd ghostscript-9.18
 ./configure --prefix=/usr/local/gs9
 sudo make install

Now you can call the new version with the command '/usr/local/gs9/bin/gs'. The OS-Version is still useable under /usr/bin/gs

In our case we use ghostscript "inside" ImageMagick and have to change the path/bindings in the /etc/ImageMagick/delegates.xml (or /usr/lib64/ImageMagick-6.2.8/config/delegates.xml) from gs to /usr/local/gs9/bin/gs.


Will remove just ghostscript

rpm -e --nodeps ghostscript-8.70-19.el6.x86_64

tells you what version you have

rpm -q ghostscript

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy