How to install older version of GhostScript?

This is second time I get segmentation fault error when I try to run GhostScript on any PDF file with pdfwrite
First time it was my previous Ubuntu 11.04 distro, which afterwards I completely remove (not because of gs), format my drive etc, and then install 11.04 again

I don't know what could be the problem. I work with GS a lot, and now all of a sudden I start getting this errors on any file, like something went wrong with this package or some of it's dependencies.
I searched Synaptic history if there maybe some recent update could cause GS crippling but there was nothing

I reported problems in the past (at least two times) on GS Launchpad branch, but no one even replied, and as a matter of fact no one ever replied to me on Launchpad for any report I issue, so I thought to remove completely ghostscript and install some other version.
At first I thought to add Debian stable repository, and install better tested version, but it turned out that perhaps that's not very good idea - adding Debian repository in Ubuntu.

As I can't "force" Synaptic to some previous GS version (as there is only one it seems - problematic one) I don't know how to approach this problem and wanted to ask how to install previous version, 8.71 preferably, because that's the last version in Debian stable.


Update:

I removed GS 9.01 (and bunch of other packages on the way) and followed Boris' advice, as I didn't know what else can I do.

I installed:

libgs8_8.71~dfsg2-9_i386.deb
ghostscript_8.71~dfsg2-9_i386.deb

and tested GS interpreter and all was working fine.

Now I wanted to put back all those packages removed by GS 9.01 removal, and I needed to first install ghostscript-x:

ghostscript-x_8.71~dfsg2-9_i386.deb

This is where problem begins:

Error:
Breaks existing package 'gsfonts' that conflict: 'gs'.
But the '/home/zetah/gs/ghostscript-x_8.71~dfsg2-9_i386.deb' provides it via: 'gs,gs-afpl,gs-esp,gs-gpl'

I didn't want to brake things so I removed just installed libgs8 and ghostscript and tried to remove gsfonts package (which additionally removed abiword, gnumeric,..) and then install all again.
But I found out that gsfonts is required by ghostscript and installed whenever ghostscript is installed (so ever before being able to install ghostscript-x package).

Now after installing libgs8 and ghostscript, when I try to install ghostscript-x I get:

Error:
Breaks existing package 'ghostscript' that conflict: 'gs'.
But the '/home/zetah/gs/ghostscript-x_8.71~dfsg2-9_i386.deb' provides it via: 'gs,gs-afpl,gs-esp,gs-gpl'

It's exactly the same if I try with Ubuntu 10.10 ghostscript 8.71 packages from Launchpad


As an alternative solution - you could compile the older version of ghostscript.

download and extract the tar file

Download the tar file from launchpad.

setup the build environment

sudo apt-get build-dep ghostscript-x

compile and install ghostscript

cd [ghostscript folder location]
sh autogen.sh
make
sudo make install

binaries

All the binaries are installed in /usr/local/bin

Thus if you run gs -v:

GPL Ghostscript 8.71 (2010-02-10) Copyright (C) 2010 Artifex Software, Inc. All rights reserved.

If you want to run ghostscript you can reassign the current symbolic link:

sudo rm /usr/bin/ghostscript
sudo ln -s /usr/local/bin/gs /usr/bin/ghostscript

Here is solution tried & tested on Ubuntu 12.04 LTS....

Download sources from http://downloads.ghostscript.com/public/

wget http://downloads.ghostscript.com/public/ghostscript-8.71.tar.gz

Uncompress downloaded source code & change to directory.

tar xvf ghostscript-8.71.tar.gz
cd ghostscript-8.71

Configure it (I used all defaults)

./configure

Start compilation with

make

If you encounter following error:

./base/gp_unix.c:148:2: warning: implicit declaration of function ‘gettimeofday’ [-Wimplicit-function-declaration] make: * [obj/gp_unix.o] Error 1

Compile using

make XCFLAGS=-DHAVE_SYS_TIME_H=1

Finally install compiled binaries using

make install

At this point you will ghostscript will be installed at /usr/local/bin/gs