I updated from:
And then I was unable to start eclipse. This appears to be because java is no longer in my path:
$ which java
/usr/bin/which: no java in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/mbooth/.local/bin:/home/mbooth/bin)
$ ls -lH /usr/bin/java
ls: cannot access /usr/bin/java: No such file or directory
The problem appears to be caused by the "/usr/lib/jvm/jre-1.8.0-openjdk.x86_64" directory no longer being present, which breaks all the alternatives symlinks.
I was able to workaround the problem by doing:
$ sudo ln -s /usr/lib/jvm/jre-1.8.0-openjdk /usr/lib/jvm/jre-1.8.0-openjdk.x86_64
$ sudo ln -s /usr/lib/jvm/java-1.8.0-openjdk /usr/lib/jvm/java-1.8.0-openjdk.x86_64
Yes. thats correct.
F21 and rawhide, where those (little bit drastical) changes goes, are unreleased software.
Please remove jdk8 completely and install it again.
Sorry for troubles.
Created attachment 926861 [details]
dir listing of /etc/alternatives and /usr/lib/jvm
(In reply to jiri vanek from comment #1)
> Yes. thats correct.
> F21 and rawhide, where those (little bit drastical) changes goes, are
> unreleased software.
> Please remove jdk8 completely and install it again.
> Sorry for troubles.
Hmm that's annoying. Will users upgrading from F20 be affected? I use java 1.8.0 on my Fedora 20 workstation -- will I be bitten by this when I upgrade to F21?
Uf. If you are using jdk8 on your workstation, then you may be affected.
Then the work around is - in f20 install 7, remove 8 and update. After update you should have only correctly working 8.
Okay, so I took the time to test it for myself. Starting from a freshly installed F20 machine:
1. Install java 1.8, then get all latest updates:
$ sudo yum install java-1.8.0-openjdk-headless java-1.8.0-openjdk
$ sudo yum install updates -y
$ sudo reboot
2. Configure java 1.8 to be the default version in use:
$ sudo alternatives --config javac
(choose java 1.8 from the menu here)
$ java -version
(this should show that java is version 1.8.0)
3. Upgrade to Fedora 21
$ sudo yum install -y https://kojipkgs.fedoraproject.org//packages/fedora-release/21/0.13/noarch/fedora-release-21-0.13.noarch.rpm https://kojipkgs.fedoraproject.org//packages/fedora-repos/21/0.5/noarch/fedora-repos-21-0.5.noarch.rpm
$ sudo yum distro-sync --nogpgcheck
4. Java no longer works
$ java -version
bash: java: command not found...
5. In addition to this, java 8 does not appear to obsolete java 7, so I still have java 7 on my upgraded F21 system:
$ sudo yum list java-*openjdk*
Loaded plugins: langpacks
java-1.7.0-openjdk.x86_64 1:22.214.171.124-126.96.36.199.fc20 @updates/20
java-1.7.0-openjdk-headless.x86_64 1:188.8.131.52-184.108.40.206.fc20 @updates/20
java-1.8.0-openjdk.x86_64 1:220.127.116.11-14.b12.fc21 @fedora
java-1.8.0-openjdk-headless.x86_64 1:18.104.22.168-14.b12.fc21 @fedora
For some reason your update picked overwritten package:
http://koji.fedoraproject.org/koji/taskinfo?taskID=7305471 is the latest (for some time!)
which DO obsolates:
Sorry, wrong link in previous comment.
Aha, that was built yesterday and the F21 Branched compose was not yet finished when I ran this upgrade earlier today, which is why I got release -14.
Running updates again now I get release -15 and I see that java 7 is correctly obsoleted. Thanks for that!
Thanx to you for testing.
I worked around this issue by deleting the symlinks and reinstalling the RPMs (yum reinstall '*openjdk*'). Is it possible to get into this state with an online upgrade from F20 w/1.8?
(In reply to Christopher Tubbs from comment #10)
> I worked around this issue by deleting the symlinks and reinstalling the
> RPMs (yum reinstall '*openjdk*'). Is it possible to get into this state with
> an online upgrade from F20 w/1.8?
If you have 8 in f20, then it will probably happen. If you have only 7, then it should update correctly.
See #c4 for workaround.
*** Bug 1130862 has been marked as a duplicate of this bug. ***
Reopening. If this can be hit on an upgrade from F20 (as comment 11 indicates), then this is definitely a bug that should be addressed.
(Side-note: I also hit this today while upgrading along the F21 path).
Removing JRE 8 entirely from F21 and then reinstalling is an unacceptable workaround as it forces the removal of many other packages (particularly the LibreOffice suite).
Proposed as a Blocker for 21-beta by Fedora user sgallagh using the blocker tracking app because:
Upgrading to Fedora 21 from a Fedora 20 system configured to use Java 8 will result in an unusable Java environment. This will cause many applications to fail and generally result in a poor impression of Fedora 21 for many users.
Justification from the Beta criteria: "For each one of the release-blocking package sets, it must be possible to successfully complete an upgrade from a fully updated installation of the previous stable Fedora release with that package set installed."
(In reply to Stephen Gallagher from comment #14)
> Reopening. If this can be hit on an upgrade from F20 (as comment 11
> indicates), then this is definitely a bug that should be addressed.
It will hit less then minority of users. And it will hit skilled users. Other users do not have jdk8 installed.
If you have only jdk7 installed (n f20), then update to f21 will be flawless.
> (Side-note: I also hit this today while upgrading along the F21 path).
> Removing JRE 8 entirely from F21 and then reinstalling is an unacceptable
> workaround as it forces the removal of many other packages (particularly the
> LibreOffice suite).
You can always remove without deps, but, the workaround for update is to remove jdk8 while still have f20, and so jdk7 installed.
The fix to this issue is to add cleaning scripts to all alternatives we use. It is making the specfile terribly messy.
As jdk8 is development revie in f20, I do not wont to support this update.
Sorry for this trouble.
Given the maintainer's unwillingness to address this serious issue, I have escalated it to FESCo: https://fedorahosted.org/fesco/ticket/1333
is the fix.
it is something what i really do not wont to include.
And the only way how to not include it, is to let those few people who already have jdk8 deal with the alternatives on theirs own.
reopened for FESCo reslution.
I read the FESCo meeting log -- since this bug affects me, I'd be happy to test any proposed solutions you have for this problem.
I can test using the method I outlined in comment 5 above until fedup is fixed.
On today's meeting FESCo declared BZ1130247 to be a blocker for F21 Beta. (+6)
I think you want an explicit "alternatives --remove <name> <target>" for each of the bad targets that there were. e.g. :
alternatives --remove java /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
before installing the new alternatives. Perhaps in a trigger.
(In reply to Orion Poplawski from comment #22)
> I think you want an explicit "alternatives --remove <name> <target>" for
> each of the bad targets that there were. e.g. :
> alternatives --remove java /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
> before installing the new alternatives. Perhaps in a trigger.
See c#18 - thats it:(
Mitr have an idea to do this in f20/f19 packages rather dirty f21 ones. I'm going to try it.
FYI, the recommendation to do 'rpm -e --nodeps' and then reinstall does *NOT* resolve the issue. I just tried it on another F21 system that I have been updating as I go.
(In reply to Stephen Gallagher from comment #25)
> FYI, the recommendation to do 'rpm -e --nodeps' and then reinstall does
> *NOT* resolve the issue. I just tried it on another F21 system that I have
> been updating as I go.
Oh thats really suspicious. But If gave sense - if you had corrupted jdk, then installed new, incompatible, then run rpm -e, then it run post of *new* and not of old, which was actually responsible:(
Anyway I have fix for f20 ready, (see c#24) which was already verified by few people around including Mat. I will soon do koji build.
java-1.8.0-openjdk-22.214.171.124-9.b12.fc20 has been submitted as an update for Fedora 20.
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing java-1.8.0-openjdk-126.96.36.199-9.b12.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
java-1.8.0-openjdk-188.8.131.52-9.b12.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.