Jessie:由于 tzdata 版本错误,无法安装 Java

Jessie : Cannot install Java due to wrong tzdata version

我想在我的 debian 服务器上安装一个 JRE(一个 sheevaplug)并得到了这个:

$ 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.

我缩小了 tzdata 包的问题范围。

安装的版本是wheezy版本(2015g-0+deb7u1)而不是jessie版本(2015f-0+deb8u1 ).

服务器已有数年历史,已从 squeeze 升级到 wheezy,然后升级到 jessie。

出于某种原因,该软件包从未升级过。 (可能是因为wheezy包是2015g版本,而jessie是"only"2015f)

如何解决我的依赖问题?

从 Debian 下载软件包并使用 dpkg 手动安装后,我成功安装了 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

您的 /etc/apt/sources.list 中可能缺少 jessie-updates - 尝试添加:

deb http://httpredir.debian.org/debian jessie-updates main

和 apt-get 更新等