[Solved] Downgrading GhostScript

If none of the more specific forums is the right place to ask

[Solved] Downgrading GhostScript

Postby zetah » 2011-12-08 07:45

Hey,

I'm on Ubuntu 11.04 and have problem with provided GS version (9.01) impossible to resolve, so I thought to downgrade to latest stable as in Debian stable (8.71)

I removed GS 9.01 (and bunch of other packages on the way) then downloaded this files from debian FTP:
Code: Select all
ghostscript_8.71~dfsg2-9_i386.deb
ghostscript-cups_8.71~dfsg2-9_i386.deb
ghostscript-doc_8.71~dfsg2-9_all.deb
ghostscript-x_8.71~dfsg2-9_i386.deb
libgs8_8.71~dfsg2-9_i386.deb


Everything is fine and tested it's working perfectly unlike previous version only that I have a problem installing `ghostscript-x` which breaks `gsfonts` on which other packages are dependant (like abiword, gnumeric...). Here is status:
Error:
Breaks existing package 'gsfonts' that conflict: 'gs'.
But the '/home/zetah/Downloads/backup/gs/ghostscript-x_8.71~dfsg2-9_i386.deb' provides it via: 'gs,gs-afpl,gs-esp,gs-gpl'


Any advice what should I do?
Last edited by zetah on 2011-12-09 20:33, edited 1 time in total.
zetah
 
Posts: 94
Joined: 2011-07-05 00:32

Re: Downgrading GhostScript

Postby damgaard » 2011-12-08 11:57

Now, I might be getting this wrong but to me it sounds like you're trying to install Debian packages on a Ubuntu system. If that's the case forget about it, Debian and Ubuntu are not 100% compatible package-wise and mixing packages like that is bound to cause problems eventually. Now, if this is not the case, you need to explain yourself a bit more clearly.
damgaard
 
Posts: 31
Joined: 2010-03-16 22:13

Re: Downgrading GhostScript

Postby zetah » 2011-12-08 14:39

I know they are not 100% compatible.
I get same error if I use Ubuntu 10.10 ghostscript packages from launchpad (that's the last version that offers 8.71 GS version)

I'm asking what should I do, as I want to install 8.71 version which is working fine here, instead 9.01 which causes mysterious segmentation faults on any file I pass on GS interpreter
I don't want want to break things in a way if it's possible.

Right now I have ghostscript 8.71 and libgs 8.71 on my system and they are working fine. However I can't install back all those packages that were removed during removing GS 9.01 version as I can't install ghostscript-x because of above error.

I hope it's clearer now?
zetah
 
Posts: 94
Joined: 2011-07-05 00:32

Re: Downgrading GhostScript

Postby damgaard » 2011-12-09 16:20

So, I had some spare time to have a play with this. I installed Ubuntu 11.04 in a virtual machine and tried to solve the dependency issues you have. Overall I'd say you have 2 options, downgrade or upgrade. If the bug is fixed in 11.10 and up, upgrading the system would probably cause you the least amount of grief. If you for whatever reason cannot or will not upgrade then downgrading must be done. You can either downgrade the entire system (in which case I'd recommend downgrading to a LTS version such as 10.04) or just some of the packages as you've already tried - in either case you should remove the Debian packages you installed and replace them with the proper ones from the Ubuntu repositories.

Disclaimer
Note that I am not at all a hardcore system administrating Ubuntu guru, if your system breaks it is your responsibility alone.


Here is what I did.

It seems that downgrading the following packages:
Code: Select all
ghostscript ghostscript-cups ghostscript-doc ghostscript-x libgs8 evince libevdocument3 libevview3 libspectre1

solved the problem. However, note that by doing this following packages:
Code: Select all
libgs9 libgs9-common

will be removed. I don't think this can be avoided as it seems that these packages replaced libgs8. Keep in mind that this was done on a clean Ubuntu 11.04 install and that YMMV with regards to extra installed packages. That is, in your case additional packages, that I cannot by any means take into account, might be removed or otherwise cause unforeseeable issues.

I added the Ubuntu 10.10 (Maverick Meercat) repositories to /etc/apt/sources.list.d/ by copying /etc/apt/sources.list to /etc/apt/sources.list.d/maverick.list and replacing all instances of natty with maverick. (Using nano, press Ctrl+\ for the search and replace functionality)
The content of /etc/apt/sources.list.d/maverick.list:
Code: Select all
######################################################
#### Ubuntu 10.10 (Maverick Meercat) Repositories ####
######################################################

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://dk.archive.ubuntu.com/ubuntu/ maverick main restricted
deb-src http://dk.archive.ubuntu.com/ubuntu/ maverick main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://dk.archive.ubuntu.com/ubuntu/ maverick-updates main restricted
deb-src http://dk.archive.ubuntu.com/ubuntu/ maverick-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://dk.archive.ubuntu.com/ubuntu/ maverick universe
deb-src http://dk.archive.ubuntu.com/ubuntu/ maverick universe
deb http://dk.archive.ubuntu.com/ubuntu/ maverick-updates universe
deb-src http://dk.archive.ubuntu.com/ubuntu/ maverick-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://dk.archive.ubuntu.com/ubuntu/ maverick multiverse
deb-src http://dk.archive.ubuntu.com/ubuntu/ maverick multiverse
deb http://dk.archive.ubuntu.com/ubuntu/ maverick-updates multiverse
deb-src http://dk.archive.ubuntu.com/ubuntu/ maverick-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://dk.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
# deb-src http://dk.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu maverick-security main restricted
deb-src http://security.ubuntu.com/ubuntu maverick-security main restricted
deb http://security.ubuntu.com/ubuntu maverick-security universe
deb-src http://security.ubuntu.com/ubuntu maverick-security universe
deb http://security.ubuntu.com/ubuntu maverick-security multiverse
deb-src http://security.ubuntu.com/ubuntu maverick-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu maverick partner
# deb-src http://archive.canonical.com/ubuntu maverick partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu maverick main
deb-src http://extras.ubuntu.com/ubuntu maverick main

For all the above mentioned packages I created pinning policies under /etc/apt/preferences.d/. The easiest way of doing this is running this code bit as root or with sudo:
Code: Select all
for a in ghostscript ghostscript-cups ghostscript-doc ghostscript-x libgs8 evince libevdocument3 libevview3 libspectre1; do echo -e "Package: $a\nPin: release a=maverick\nPin-Priority: 700" > /etc/apt/preferences.d/ps_downgrade_policies_$a; done

It will create the following files under /etc/apt/preferences.d/
Code: Select all
ps_downgrade_policies_ghostscript
ps_downgrade_policies_ghostscript-cups
ps_downgrade_policies_ghostscript-doc
ps_downgrade_policies_ghostscript-x
ps_downgrade_policies_libgs8
ps_downgrade_policies_evince
ps_downgrade_policies_libevdocument3
ps_downgrade_policies_libevview3
ps_downgrade_policies_libspectre1

containing:
Code: Select all
Package: package-name-here
Pin: release a=maverick
Pin-Priority: 1000

Then, as root or with sudo, issue
Code: Select all
apt-get update
apt-get dist-upgrade

and you're done.
If/when you want to remove the pinning, just delete the files previously created under /etc/apt/preferences.d/ and run
Code: Select all
apt-get dist-upgrade

Pinning the packages might prevent you from being able to properly update the system until the pinning is removed.

Edit:
I'm currently working on downgrading the Ubuntu system installed on a virtual machine and will report back whether or not it succeeds.
The one-liner for stateement has been corrected tho include "echo -e" rather than just "echo".
Last edited by damgaard on 2011-12-09 17:22, edited 2 times in total.
damgaard
 
Posts: 31
Joined: 2010-03-16 22:13

Re: Downgrading GhostScript

Postby zetah » 2011-12-09 17:14

Thank you for your time damgaard
I appreciate work you've done, but I'm unsure if I should follow it. Here are my notes/considerations:

- I will not upgrade to Ubuntu 11.10 ever or Gnome 3 in near future
- I will not downgrade my whole system, because of GS
- I followed all your suggestions to point of installing

Now, ghostscript 8.71 packages appear in Synaptic, and it seems like I can install it, but I'm not sure if it's safe as I'm new to Linux and don't understand your suggestions.
Sorry for my suspicion, but I once messed with packages and broke whole system, then I had to reinstall everything again, something I really don't want to happen, so can someone comment if this is safe to run? Is it safe to just install this packages this way?

Thanks again damgaard, and I hope your scheme works and can be used as a model to similar downgrades
zetah
 
Posts: 94
Joined: 2011-07-05 00:32

Re: Downgrading GhostScript

Postby damgaard » 2011-12-09 17:40

zetah wrote:Thank you for your time damgaard
I appreciate work you've done, but I'm unsure if I should follow it. Here are my notes/considerations:

- I will not upgrade to Ubuntu 11.10 ever or Gnome 3 in near future
- I will not downgrade my whole system, because of GS
- I followed all your suggestions to point of installing

Well, as I see it, if you will not upgrade nor downgrade the system as a whole, you're stuck with either downgrading the packages related to ghostscript or with a version of ghostscript that segfaults. I really cannot see any other option.

zetah wrote:Minor note: `for` one liner needs to be corrected as "\n" is considered as literal string - not as line break

True, has been fixed, thanks.
zetah wrote:Now, ghostscript 8.71 packages appear in Synaptic, and it seems like I can install it, but I'm not sure if it's safe as I'm new to Linux and don't understand your suggestions.
Sorry for my suspicion, but I once messed with packages and broke whole system, then I had to reinstall everything again, something I really don't want to happen, so can someone comment if this is safe to run? Is it safe to just install this packages this way?

I can't blame you for being reluctant as a broken system is a pain to deal with if you're not all that experienced with Linux. I remember clearly the first many times I broke one of my systems. Now, if you have done all but install the packages, open a terminal/console and type sudo apt-get dist-upgrade (nothing bad will happens as apt will ask for confirmation before executing the command) and post the output here. I can have a look at it to see if it's safe.
zetah wrote:Thanks again damgaard, and I hope your scheme works and can be used as a model to similar downgrades
damgaard
 
Posts: 31
Joined: 2010-03-16 22:13

Re: Downgrading GhostScript

Postby zetah » 2011-12-09 18:30

I run `sudo apt-get dist-upgrade`:

Code: Select all
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  cups cups-driver-gutenprint ghostscript-cups
The following packages will be upgraded:
  acpid bcompare telepathy-haze unity-mail
4 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.3 MB/12.6 MB of archives.
After this operation, 9380 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ppa.launchpad.net/mitya57/ppa/ubuntu/ natty/main unity-mail all 0.9.4 [49.8 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main acpid i386 1:2.0.7-1ubuntu2.4 [33.6 kB]
Get:3 http://www.scootersoftware.com/ stable/non-free bcompare i386 3.3.3-14128 [10.1 MB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ maverick/main ghostscript-cups i386 8.71.dfsg.2-0ubuntu7 [52.9 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main telepathy-haze i386 0.4.0-1ubuntu0.1 [66.4 kB]
Fetched 10.3 MB in 24s (423 kB/s)
Preconfiguring packages ...
(Reading database ... 364967 files and directories currently installed.)
Preparing to replace acpid 1:2.0.7-1ubuntu2.1 (using .../acpid_1%3a2.0.7-1ubuntu2.4_i386.deb) ...
acpid stop/waiting
Unpacking replacement acpid ...
Preparing to replace bcompare 3.3.2-14050 (using .../bcompare_3.3.3-14128_i386.deb) ...
Unpacking replacement bcompare ...
Selecting previously deselected package cups.
Unpacking cups (from .../cups_1.4.6-5ubuntu1.4_i386.deb) ...
Selecting previously deselected package ghostscript-cups.
Unpacking ghostscript-cups (from .../ghostscript-cups_8.71.dfsg.2-0ubuntu7_i386.deb) ...
Selecting previously deselected package cups-driver-gutenprint.
Unpacking cups-driver-gutenprint (from .../cups-driver-gutenprint_5.2.6-1ubuntu1_i386.deb) ...
Preparing to replace telepathy-haze 0.4.0-1ubuntu (using .../telepathy-haze_0.4.0-1ubuntu0.1_i386.deb) ...
Unpacking replacement telepathy-haze ...
Preparing to replace unity-mail 0.9.3 (using .../unity-mail_0.9.4_all.deb) ...
Unpacking replacement unity-mail ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for doc-base ...
Processing 1 added doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for ufw ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for python-support ...
Setting up acpid (1:2.0.7-1ubuntu2.4) ...
Installing new version of config file /etc/acpi/powerbtn.sh ...
acpid start/running, process 20025
Setting up bcompare (3.3.3-14128) ...
OK
Setting up cups (1.4.6-5ubuntu1.4) ...
cups start/running, process 20120
Setting up ghostscript-cups (8.71.dfsg.2-0ubuntu7) ...
Setting up cups-driver-gutenprint (5.2.6-1ubuntu1) ...
No Gutenprint PPD files to update.

lpstat: No such file or directory
Setting up telepathy-haze (0.4.0-1ubuntu0.1) ...
Setting up unity-mail (0.9.4) ...


I then run Synaptic and tried to install Evince, but:

evince:
Depends: evince-common but it is not going to be installed
Depends: evince-common but it is not going to be installed


Should I make similar file in /etc/apt/preferences.d/ for Evince?

Not being able to install Evince I wont be able to install Gnumeric.
Installing ghostscript-x was my problem mainly because it was needed by Evince. All other packages which I noted in a file I either don't know they existed or I succeed installing them without ghostscript-x: pstoedit, pstotext, ps2eps, some texlive files...
zetah
 
Posts: 94
Joined: 2011-07-05 00:32

Re: Downgrading GhostScript

Postby damgaard » 2011-12-09 19:05

zetah wrote:I run `sudo apt-get dist-upgrade`:
I then run Synaptic and tried to install Evince, but:
Code: Select all
evince:
 Depends: evince-common but it is not going to be installed
 Depends: evince-common but it is not going to be installed

Should I make similar file in /etc/apt/preferences.d/ for Evince?

Yes, that's what the one-liner with the for loop was about.
zetah wrote:Not being able to install Evince I wont be able to install Gnumeric.
Installing ghostscript-x was my problem mainly because it was needed by Evince. All other packages which I noted in a file I either don't know they existed or I succeed installing them without ghostscript-x: pstoedit, pstotext, ps2eps, some texlive files...

I was under the impression that your main problem was ghostscript causing unmentioned issues which is why you installed Debian packages in the first place in an attempt to solve it.
Now, run the one-line code bit I posted earlier. Then run
Code: Select all
apt-get dist-upgrade

in a terminal and without accepting the proposed changes, post the output here.
damgaard
 
Posts: 31
Joined: 2010-03-16 22:13

Re: Downgrading GhostScript

Postby zetah » 2011-12-09 19:25

damgaard wrote:Yes, that's what the one-liner with the for loop was about.


I already did that
Code: Select all
$ ll /etc/apt/preferences.d
total 44
drwxr-xr-x 2 root root 4096 2011-12-09 17:54 ./
drwxr-xr-x 6 root root 4096 2011-12-09 18:33 ../
-rw-r--r-- 1 root root   58 2011-12-09 17:54 ps_downgrade_policies_evince
-rw-r--r-- 1 root root   63 2011-12-09 17:54 ps_downgrade_policies_ghostscript
-rw-r--r-- 1 root root   68 2011-12-09 17:54 ps_downgrade_policies_ghostscript-cups
-rw-r--r-- 1 root root   67 2011-12-09 17:54 ps_downgrade_policies_ghostscript-doc
-rw-r--r-- 1 root root   65 2011-12-09 17:54 ps_downgrade_policies_ghostscript-x
-rw-r--r-- 1 root root   66 2011-12-09 17:54 ps_downgrade_policies_libevdocument3
-rw-r--r-- 1 root root   62 2011-12-09 17:54 ps_downgrade_policies_libevview3
-rw-r--r-- 1 root root   58 2011-12-09 17:54 ps_downgrade_policies_libgs8
-rw-r--r-- 1 root root   63 2011-12-09 17:54 ps_downgrade_policies_libspectre1

$ cat /etc/apt/preferences.d/ps_downgrade_policies_evince
Package: evince
Pin: release a=maverick
Pin-Priority: 700



damgaard wrote:I was under the impression that your main problem was ghostscript causing unmentioned issues which is why you installed Debian packages in the first place in an attempt to solve it.


Right now I have ghostscript 8.71 and libgs 8.71 on my system and they are working fine. However I can't install back all those packages that were removed during removing GS 9.01 version as I can't install ghostscript-x because of above error.


In the meantime I managed to install some packages as I wrote in my last post, but could not install Evince, Gnumeric and couple of other packages
zetah
 
Posts: 94
Joined: 2011-07-05 00:32

Re: Downgrading GhostScript

Postby damgaard » 2011-12-09 19:51

Try making a similar one for evince-common under /etc/apt/preferences.d/ and run apt-get dist-upgrade again. The thing is that maybe you get lucky and there will be no further dependency issues, but as I do not know the specifics of your installed system I cannot say for sure. This is the very reason why I advised you to consider upgrading in the first place. Now, if downgrading evince-common won't solve it, I suggest you revert the changes by deleting the ps_downgrade_policies_* from /etc/apt/preferences.d/, remove the repository file "maverick.list" from /etc/apt/sources.list.d/ and run
Code: Select all
apt-get update
apt-get dist-upgrade

to upgrade the downgraded packages. That should bring your system back to as it was when you posted this thread. If you're still having the original problem then we can take it from there
damgaard
 
Posts: 31
Joined: 2010-03-16 22:13

Re: Downgrading GhostScript

Postby zetah » 2011-12-09 20:08

All right :) it was just that one more dependence. Evince and Gnumeric are finally back and working, thanks damgaard for you guidance

I asked this problem on AskUbuntu, but no one dared to answer even I added bounty: http://askubuntu.com/questions/85810/ho ... hostscript
I'll link your answer and credit your name if you don't mind
zetah
 
Posts: 94
Joined: 2011-07-05 00:32

Re: Downgrading GhostScript

Postby damgaard » 2011-12-09 20:31

zetah wrote:All right :) it was just that one more dependence. Evince and Gnumeric are finally back and working, thanks damgaard for you guidance

Good to hear that it's sorted.
zetah wrote:I asked this problem on AskUbuntu, but no one dared to answer even I added bounty: http://askubuntu.com/questions/85810/ho ... hostscript
I'll link your answer and credit your name if you don't mind

By all means.
Would you mind marking the thread as solved, then?
damgaard
 
Posts: 31
Joined: 2010-03-16 22:13


Return to General Questions

Who is online

Users browsing this forum: No registered users and 21 guests

fashionable