Search code examples
debianaptdpkg

Jessie : Cannot install Java due to wrong tzdata version


I wanted to install a JRE on my debian server (a sheevaplug) and got this :

$ sudo apt-get install default-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 default-jre : Depends: default-jre-headless (= 2:1.7-52) but it is not going to be installed
               Depends: openjdk-7-jre (>= 7~u3-2.1.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I narrowed down the problem to be with the tzdata package.

The installed version is the wheezy version (2015g-0+deb7u1) instead of the jessie version (2015f-0+deb8u1).

The server is several years old and has been upgraded from squeeze to wheezy, then to jessie.

For some reason, the package never upgraded. (May be because the wheezy package is version 2015g, while the jessie is "only" 2015f)

How can I solve my dependency problem ?


Solution

  • After downloading the package from Debian and manually installing it with dpkg, I managed to install the JRE.

    wget http://ftp.fr.debian.org/debian/pool/main/t/tzdata/tzdata_2015f-0+deb8u1_all.deb
    sudo dpkg -i tzdata_2015f-0+deb8u1_all.deb
    sudo apt-get install default-jre