You are not logged in.

#1 2023-11-04 22:53:02

Funny0facer
Member
From: Germany
Registered: 2022-12-03
Posts: 40

[SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#2 2023-11-04 23:13:26

renordw
Member
From: New Mexico
Registered: 2018-03-04
Posts: 56

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#3 2023-11-04 23:25:39

souldrone
Member
Registered: 2022-10-16
Posts: 2

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#4 2023-11-04 23:25:48

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,885
Website

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#5 2023-11-05 06:03:17

andheisus
Member
Registered: 2016-04-16
Posts: 20

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#6 2023-11-05 06:06:07

setone
Member
Registered: 2012-08-31
Posts: 9

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#7 2023-11-05 06:15:50

nurik
Member
Registered: 2023-11-05
Posts: 2

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#8 2023-11-05 06:58:44

midian
Member
Registered: 2019-02-21
Posts: 39

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

Same issue here. setone's solution worked for me.

Offline

#9 2023-11-05 07:35:44

Henkm
Member
From: Dutch living in Malaysia
Registered: 2015-11-11
Posts: 21

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#10 2023-11-05 07:58:50

nurik
Member
Registered: 2023-11-05
Posts: 2

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

Offline

#11 2023-11-05 09:52:31

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#12 2023-11-05 10:21:24

mbw
Member
Registered: 2020-01-04
Posts: 36

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#13 2023-11-05 12:32:00

Funny0facer
Member
From: Germany
Registered: 2022-12-03
Posts: 40

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#14 2023-11-05 15:01:00

gary8588
Member
Registered: 2022-08-09
Posts: 24

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#15 2023-11-05 18:09:07

gyrozepelli3589
Member
Registered: 2023-11-05
Posts: 3

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#16 2023-11-05 18:41:03

Funny0facer
Member
From: Germany
Registered: 2022-12-03
Posts: 40

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

@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

#17 2023-11-05 20:24:19

reidh
Member
Registered: 2022-03-21
Posts: 2

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

setone's post did it for me to. Thank you.

Offline

#18 2023-11-05 21:39:20

nilesOien
Member
From: Boulder, CO, USA
Registered: 2015-05-08
Posts: 77

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#19 2023-11-05 22:03:52

seth
Member
Registered: 2012-09-03
Posts: 51,498

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

ant requires java-environment, so you cannot remove jdk-openjdk, but must drop jre-* instead.

Offline

#20 2023-11-05 22:13:09

Andril
Member
Registered: 2019-02-22
Posts: 2

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#21 2023-11-05 22:15:18

nilesOien
Member
From: Boulder, CO, USA
Registered: 2015-05-08
Posts: 77

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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

#22 2023-11-05 22:23:22

seth
Member
Registered: 2012-09-03
Posts: 51,498

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

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.

Offline

#23 2023-11-05 22:45:57

nilesOien
Member
From: Boulder, CO, USA
Registered: 2015-05-08
Posts: 77

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

@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

#24 2023-11-06 04:52:45

felipealfonsog
Member
From: Santiago Metropolitan, Chile
Registered: 2023-04-22
Posts: 1
Website

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

andheisus wrote:

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

#25 2023-11-06 05:11:57

gyrozepelli3589
Member
Registered: 2023-11-05
Posts: 3

Re: [SOLVED]How to resolve jre-openjdk and jre-openjdk-headless conflicts?

Funny0facer wrote:

@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

Board footer

Powered by FluxBB