openjdk-8-jre-headless : Depends: ca-certificates-java but it is not going to be installed
Solution 1
is this jessie? With backports
apt install -t jessie-backports openjdk-8-jre-headless ca-certificates-java
Solution 2
It is not working from Jessie backports. I tried stretch and it got installed.
echo 'deb http://ftp.au.debian.org/debian/ stretch main contrib non-free' > /etc/apt/sources.list.d/stretch.list && \
apt-get update && \
apt-get install -y --no-install-recommends openjdk-8-jre-headless && \
rm /etc/apt/sources.list.d/stretch.list && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
P.S.: I used an Australian mirror since I am here. Choose the best for you from here.
Solution 3
this worked for me many thanks, note you got an extra 'deb' in your echo i had to remove, i am also in Oz but this should work on all repos by now, seems it was an issue with certificates for fixed list of java versions
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851667
Solution 4
I keep hitting this issue. Very frustrating. I have automated packer builds and when the jdk/jre are updated this issue can resurface. after much hair pulling i've found this to be fairly reliable and fully automateable.
note that you mush have a backports repo properly defined as mentioned in other parts of this page. my image came with it pre set up. yours however, may not.
- install ca-certs from backports
install jre and jdk + headless as a second command
sudo apt install -t jessie-backports ca-certificates-java sudo apt-get -y install openjdk-8-jdk openjdk-8-jre openjdk-8-jdk-headless openjdk-8-jre-headless
running the two together will prompt for a Y/N response on a config file, which are annoying to automate. so they MUST be run separately if you want this to work w/o human interaction.
Related videos on Youtube
Jason
Updated on September 18, 2022Comments
-
Jason over 1 year
Can't install Java8
apt-get install openjdk-8-jre-headless 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: openjdk-8-jre-headless : Depends: ca-certificates-java but it is not going to be installed E: Unable to correct problems, you have held broken packages
I've searched Google and I've added repos and other suggestions, but nothing has allowed me to install Java 8 yet.
ideas?
lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.7 (jessie) Release: 8 Codename: jessie
-
Jay over 7 yearsFacing the same problem here. It was working till yesterday. Today it initially complained about ca-certificates-java and now can't even find the package.
-
ka3ak over 7 yearsJust interesting, why don't you want to install oracle version?
-
Jason over 7 years@ka3ak what is the oracle install version? I tried doing an apt-get install with a package that had install and oracle in it but it did not work.
-
ka3ak over 7 years@FrankThornton Here is how I installed it on my system (Kubuntu): sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer Source: webupd8.org/2012/09/…
-
Jason over 7 yearsThanks! I was pretty sure I tried that or at least something kinda like that and had issues. I may have had a different repo.
-
Brian Bulkowski over 7 years@ka3ak because I don't like adding extra repos. As far as I can tell, the openjdk builds are close enough to the performance of the standard oracle builds ( not true in 6, but true now ) that the extra steps / security of an extra repo created by "webupd8team" is not necessary and extra risk.
-
-
Kusalananda over 7 years
-
Jason over 7 yearsBackport issue looks like. That allowed it to install.
-
victor about 7 yearsThat worked for me, too. Mind adding an explanation what the
-t
parameter does and how this resolves the issue? -
Admin about 7 yearsThe option -t tells apt, from which source it should install the package.
aptitude why-not ca-certificates-java
givesp openjdk-8-jre-headless Beschädigt ca-certificates-java (< 20160321~)
You need the Version from jessie-backports.apt-cache policy ca-certificates-java ca-certificates-java: Installiert: 20140324 Installationskandidat: 20140324 Versionstabelle: 20161107~bpo8+1 0 100 http://http.us.debian.org/debian/ jessie-backports/main amd64 Packages *** 20140324 0 500 http://http.us.debian.org/debian/ jessie/main amd64 Packages