Issue
I'm trying to remove Amazon Corretto from fedora 30 distro
but im getting below error:
[root@smaini ~]# dnf remove java-11-amazon-corretto-devel
Remove 1 Package
Freed space: 306 M Is this ok [y/N]: y
Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: java-11-amazon-corretto-devel-1:11.0.5.10-1.x86_64 1/1
failed to read link /usr/bin/javac: No such file or directory error: %preun(java-11-amazon-corretto-devel-1:11.0.5.10-1.x86_64) scriptlet failed, exit status 2
Error in PREUN scriptlet in rpm package java-11-amazon-corretto-devel Verifying : java-11-amazon-corretto-devel-1:11.0.5.10-1.x86_64 1/1
Failed: java-11-amazon-corretto-devel-1:11.0.5.10-1.x86_64
Error: Transaction failed
Please help on this
Solution
There is a bug in the scriptlet of java-11-amazon-corretto-devel
. You cannot do anything about it. Beside reporting it to author of that package.
You can check the scriptlet using: rpm -q --scripts java-11-amazon-corretto-devel
You can remove the package without running the scripts (with all implications): rpm -e --noscripts java-11-amazon-corretto-devel
Answered By - msuchy