You are not logged in.
Hi,
I have jre-openjdk and jre-openjdk-headless installed at the moment. The package jdk-openjdk is not installed.
I tried
sudo pacman -Syu
sudo pacman -Syu jre-openjdk
sudo pacman -Syu jre-openjdk-headless
non of those succeeded. I always get the error:
looking for conflicting packages...
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: jre-openjdk-headless and jre-openjdk are in conflict
I guess I want to keep jre-openjdk on my system in the end, but how can I make this work? https://archlinux.org/news/incoming-cha … ervention/ only states "install it manually". But how?
Thanks for helping me out.
Here is what pacman -Qi tells me about those packages
Name : jre-openjdk
Version : 21.u35-3
Description : OpenJDK Java 21 full runtime environment
Architecture : x86_64
URL : https://openjdk.java.net/
Licenses : custom
Groups : None
Provides : java-runtime=21 java-runtime-openjdk=21 jre21-openjdk=21.u35-3
Depends On : jre21-openjdk-headless=21.u35-3 giflib libgif.so glibc gcc-libs libpng
Optional Deps : alsa-lib: for basic sound support [installed]
gtk2: for the Gtk+ 2 look and feel - desktop usage [installed]
gtk3: for the Gtk+ 3 look and feel - desktop usage [installed]
Required By : None
Optional For : libbluray libjpeg-turbo libjxl libreoffice-fresh opencv texlive-latexextra
Conflicts With : None
Replaces : None
Installed Size : 589.86 KiB
Packager : Frederik Schwan <freswa@archlinux.org>
Build Date : Thu Sep 21 21:15:27 2023
Install Date : Sun Sep 24 19:09:47 2023
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By : Signature
----------------------
Name : jre-openjdk-headless
Version : 21.u35-3
Description : OpenJDK Java 21 headless runtime environment
Architecture : x86_64
URL : https://openjdk.java.net/
Licenses : custom
Groups : None
Provides : java-runtime-headless=21 java-runtime-headless-openjdk=21 jre21-openjdk-headless=21.u35-3
Depends On : java-runtime-common>=3 ca-certificates-utils nss libjpeg-turbo libjpeg.so=8-64 lcms2 liblcms2.so=2-64 libnet freetype2 libfreetype.so=6-64
harfbuzz libharfbuzz.so=0-64 glibc gcc-libs
Optional Deps : java-rhino: for some JavaScript support
Required By : jre-openjdk
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 192.59 MiB
Packager : Frederik Schwan <freswa@archlinux.org>
Build Date : Thu Sep 21 21:15:27 2023
Install Date : Sun Sep 24 19:09:47 2023
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By : Signature
edit & tldr solution:
pacman -Sy instead of pacman -Syu
Last edited by Funny0facer (2023-11-05 23:11:26)
Offline
Thanks for posting the question. I'm in quite a similar situation, dependencies seem to be quite entangled and without an opinionated tool, I am not sure which one to keep.
Offline
I just did this and it worked:
yay -Rdd jre-openjdk-headless
This removes the package WITHOUT checking for dependencies. It can be dangerous, so if it is not critical, please wait for a more informed opinion.
Offline
Since apparently nothing on your system depends on either (beyond themselves), remove both?
If you do need Java for whatever reason, then I suggest removing the non-headless variant before running 'pacman -Syu', since the version you have installed depends on the headless version.
Edit: out of interest, when's the last time you cleaned up your orphan packages?
Last edited by WorMzy (2023-11-04 23:27:59)
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
It seems to me that there could be a typo in the front page Latest News official notice regarding the jdk/jre conflict. The emailed newsletter states that to resolve it, use
sudo pacman -Sy jdk-openjdk
- not the
sudo pacman -Syu jdk-openjdk
that is on the front page Latest News. -Sy works, -Syu did not for me.
Offline
Just do
# pacman -S jre-openjdk
You'll see
Sync Dependency (1): jre-openjdk-21.u35-7
resolving dependencies...
looking for conflicting packages...
:: jre-openjdk and jre-openjdk-headless are in conflict. Remove jre-openjdk-headless? [y/N]
and you can answer 'y' to remove jre-openjdk-headless. Then, if jre-openjdk was originally installed as a dependency for some other package, you can mark it as such by
# pacman -D --asdeps jre-openjdk
Offline
Hi. They haven't had any conflicts before. What could be the reason? I need these packages to work with electronic keys in the "pfx" format. Here is what pacman -Qi tells me about those packages:
Name : jre-openjdk
Version : 21.u35-3
Required By : jdk-openjdk xdman
Optional For : brltty libbluray libjpeg-turbo libjxl libreoffice-still
Name : jdk-openjdk
Version : 21.u35-3
Required By : None
Optional For : libreoffice-still
Offline
Same issue here. setone's solution worked for me.
Offline
For me `sudo pacman -Syu jdk-openjdk` didn't work either; `sudo pacman -Sy jdk-openjdk` did. Perhaps the advice on the frontpage could be amended?
Offline
Problem solved: https://archlinux.org/news/incoming-cha … ervention/
Offline
For me the solution was to run this prior to the latest updates since I had some jre as well as jdk packages:
sudo pacman -Rs openjdk-doc jdk-openjdk
and then today with further conflicts, I did the following to install the jdk packages:
sudo pacman -Rs jre-openjdk jre-openjdk-headless icedtea-web
and then
sudo pacman -Syu jdk-openjdk
This allowed the update to proceed without error or conflict, and the system seems fine now.
With the latest packages now installed the pacman -Qi output is different to that quoted above:
$ pacman -Qi jdk-openjdk
Name : jdk-openjdk
Version : 21.u35-7
Description : OpenJDK Java 21 development kit
...
Required By : None
Optional For : libbluray libjpeg-turbo libjxl libreoffice-still opencv subversion
texlive-latexextra
Conflicts With : jre-openjdk jre-openjdk-headless
Also after this I could now install icedtea-web again with no package conflicts.
Last edited by mcloaked (2023-11-05 10:04:12)
Mike C
Offline
I just came across this because the suggested `pacman -Syu jdk-openjdk` did not work (only -Sy did, like people have suggested).
Can https://archlinux.org/news/incoming-cha … ervention/ be edited to have this corrected?
Offline
I can confirm.
sudo pacman -Sy jre-openjdk
did the trick! Thanks all!
I guess, this thread can be closed.
@WorMzy: good idea, I should check my orphan packages in the near future. But as there as some packages relying on it [optional], I probably will keep it on this system.
Last edited by Funny0facer (2023-11-05 12:32:26)
Offline
Sorry I would have a question. If nothing conflicts on updating normally (pacman -Syu). Does this mean I do not need to take any action?
I have now installed these packages:
$ pacman -Qs | grep -E "jre|jdk"
local/jdk-openjdk 21.u35-7
local/jdk11-openjdk 11.0.21.u9-3
local/jre11-openjdk 11.0.21.u9-3
local/jre11-openjdk-headless 11.0.21.u9-3
local/jre17-openjdk 17.0.9.u8-2
local/jre17-openjdk-headless 17.0.9.u8-2
Last edited by gary8588 (2023-11-05 15:02:23)
Offline
for me jdk-openjdk and jre-openjdk seems to be in conflict
I can install them individually with pacman -S but it seems like both of them cant work together.
Either one of them has to removed.
Last edited by gyrozepelli3589 (2023-11-05 18:11:55)
Offline
@gary8588: No conflict means no problem.
@gyrozepelli3589: yes, this is expected behavior. Did you read the news? https://archlinux.org/news/incoming-cha … ervention/ You have to choose what package to keep. I personally would recommend sticking with jdk-openjdk if it was already installed.
Offline
setone's post did it for me to. Thank you.
Offline
I'm lost. According to
https://archlinux.org/news/incoming-cha … ervention/
"If you have both JDK and JRE installed you can manually install the JDK with
pacman -Syu jdk-openjdk and this removes the JRE related packages."
So I tried that :
# pacman -Syu jdk-openjdk
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: jdk-openjdk and jre-openjdk are in conflict
Then I tried setone's solution :
# pacman -S jre-openjdk
resolving dependencies...
looking for conflicting packages...
:: jre-openjdk and jdk-openjdk are in conflict. Remove jdk-openjdk? [y/N] y
:: jre-openjdk and jre-openjdk-headless are in conflict. Remove jre-openjdk-headless? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: removing jdk-openjdk breaks dependency 'java-environment' required by ant
:: removing jdk-openjdk breaks dependency 'jdk21-openjdk=21.u35-3' required by openjdk-doc
I also tried what andheisus suggested :
# pacman -Sy jdk-openjdk
:: Synchronizing package databases...
core is up to date
extra 8.2 MiB 351 KiB/s 00:24 [----------------------------------------] 100%
community is up to date
resolving dependencies...
looking for conflicting packages...
:: jdk-openjdk and jre-openjdk are in conflict. Remove jre-openjdk? [y/N] y
:: jdk-openjdk and jre-openjdk-headless are in conflict. Remove jre-openjdk-headless? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: installing jdk-openjdk (21.u35-7) breaks dependency 'jdk21-openjdk=21.u35-3' required by openjdk-doc
None of the solutions removed one or both of the packages that are now in conflict. I could force removal of one or both, but it seems a bit rough. I do use java to compile a package (using ant) that I like to test under Arch, because I think it gives me an idea of if my software will run on the latest version of what's coming.
Any help would be appreciated.
-- "Make it as simple as possible, but no simpler" - Albert Einstein
Offline
ant requires java-environment, so you cannot remove jdk-openjdk, but must drop jre-* instead.
Online
I came across and did this as an option...
sudo pacman -Syu --ignore=jre-openjdk --ignore=jdk-openjdk --ignore=jre-openjdk-headless
Or just uninstall and reinstall the packages - and update until things get sorted
Offline
Thanks, Seth. So from what you're saying I should :
# pacman -R jre-openjdk
Is that correct? I have minimal experience with manually removing packages under Arch, since pacman is very good and I've only rarely had to do things manually. I want to be sure before I go ahead with it. Can you confirm that the command I just posted is what I should do?
Last edited by nilesOien (2023-11-05 22:16:07)
-- "Make it as simple as possible, but no simpler" - Albert Einstein
Offline
Things are "sorted", you'll have to face and resolve the conflict at some point (when updating the java packages)
You can uninstall all java packages, update and re-install the desired one(s).
@nilesOien, try "pacman -S jdk-openjdk openjdk-doc"
And everyone who at any point issued "pacman -Sy" (even if the update was then aborted) without an "u" has to do "pacman -Su" afterwards to not run into partial udpates.
Eg. setone's approch only works because of a previously failed "-Sy", otherwise the older local database wouldn't be aware of the conflict.
Online
@seth Thanks, pacman -Su; pacman -S jdk-openjdk openjdk-doc worked. I'll tend to avoid pacman -Sy in future to avoid partial updates.
-- "Make it as simple as possible, but no simpler" - Albert Einstein
Offline
It seems to me that there could be a typo in the front page Latest News official notice regarding the jdk/jre conflict. The emailed newsletter states that to resolve it, use
sudo pacman -Sy jdk-openjdk
- not the
sudo pacman -Syu jdk-openjdk
that is on the front page Latest News. -Sy works, -Syu did not for me.
This worked out perfectly for me. Thanks!.
"Creativity is intelligence having fun." - Albert Einstein
Offline
@gary8588: No conflict means no problem.
@gyrozepelli3589: yes, this is expected behavior. Did you read the news? https://archlinux.org/news/incoming-cha … ervention/ You have to choose what package to keep. I personally would recommend sticking with jdk-openjdk if it was already installed.
So from what I understand from the news I only need jdk and the jre packages would be included with it.is that right?
Offline