It's the correct way to downgrade a package, but you seem to have got the version number wrong....
apt-get install sun-java6-jdk=6.22-0ubuntu1~10.10 - won't work since there is no such package in the Package.gz list, that's why you got the error: Version ‘6.22-0ubuntu1~10.10’ for ‘sun-java6-jdk’ was not found.
Try this...
dpkg -r sun-java6-jdk
--- Removes the sun-java6-jdk
Download the .deb for your previous sun-java6-jdk version, you may already have this file in /var/cache/apt/archives --- use: $ ls /var/cache/apt/archives/sun* -lash
in your terminal to find out whether you have an older version locally.
apt-get install -d sun-java-jdk
/ openjdk-6-jdk -- the -d will only download the file into your /var/cache/apt/arhives folder.
dpkg -i --force-downgrade /var/cache/apt/archives/sun-java-jdk
(the version # that you have).
Lock Version in Synaptic so ubuntu doesn't try to upgrade it again.
Dpkg man page will also help explain things -- downgrade has a big warning label on it in the man pages, so take note you don't wreck your dependencies.
There is a post here and here that explains downgrading.
Please Note: Even though Honza initially said that he did not want to compile, we discussed using checkinstall
to install the compiled package in the comments above. That was just what Honza wanted, as programs installed with checkinstall
can be removed like any other package with the package manager.
As we are installing to /opt
using checkinstall
after the build, we can leave the original imagemagick
package in place. (Infact, install the repository version if it is not already installed.) The dependencies can be left installed, and they are no different for the most recent version of imagemagick
. What we need to do is install the build dependencies and some other tools first of all:
sudo apt-get install build-essential checkinstall && sudo apt-get build-dep imagemagick
Download the source code from the official site and, using terminal, cd
to where the source package is and extract it:
tar -xzvf ImageMagick-6.8.3-9.tar.gz
Now move to that folder with
cd Imagemagick-6.8.3-9
Now, if you want to find out the available options for the build, run
./configure --help
However, mostly everything is already set to enabled
, so there is little need to specify anything further, apart from the necessary --prefix
. You could use other locations, but we shall use /opt
here. Now run configure
and make
:
./configure --prefix=/opt/imagemagick-6.8 && make
Now, the last thing to do is to use checkinstall
to install the package. Make sure you are in the Imagemagick-6.8.3-9
folder and run
sudo checkinstall
You can of course run checkinstall
with parameters such as --pkgversion=
or choose them after you have run sudo checkinstall
, but all the defaults are fine here. The package name that will be created will be called imagemagick-6.8.3-9
and it will be installed in /opt/imagemagick-6.8
.
You will now be also able to see the package in Synaptic
and manage it just like any other packages, and removing it will not cause problems with other packages.
If you want to run your new versions, you will need to use /opt/imagemagick-6.8/convert
, for example, as /opt
is not in $PATH
, and just running convert
will call the repo version. You could create some symlinks if you wanted to always run the /opt
version of the programs.
Please note that this is what Honza wanted, even though he initially was averse to compiling, until checkinstall
was discussed.
Best Answer
According to http://www.imagemagick.org/discourse-server/viewtopic.php?t=29006#p129405, there is a PPA that provides the 6.8.9.9 version of ImageMagick for Ubuntu 14.04 at https://launchpad.net/~isage-dna/+archive/ubuntu/imagick that you can try at your own risk: