So I tried to build the .rpm file that Oracle gives. The installation was not 100% successful so i want to uninstall it and do it the easy way this openjdk, but now i cant install nothing cause linux tells me jdk is on the system when its not. Linux tries tries to remove it and fails blocking me from installing anything:
For example if i tried
sudo apt install openjdk-7-jdk
It gives me this:
0 upgraded, 38 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/62,5 MB of archives.
After this operation, 162 MB disk space will be freed.
Do you want to continue? [Y/n] y
Extracting templates from packages: 100%
(Reading database ... 183637 files and directories currently installed.)
Removing jdk1.8.0-101 (1.8.0101-fcs-1) ...
find: `/usr/java/*': No such file or directory
/var/lib/dpkg/info/jdk1.8.0-101.postrm: line 586: /usr/sbin/alternatives: No such file or directory
/var/lib/dpkg/info/jdk1.8.0-101.postrm: line 598: /usr/sbin/alternatives: No such file or directory
dpkg: error processing package jdk1.8.0-101 (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
jdk1.8.0-101
E: Sub-process /usr/bin/dpkg returned an error code (1)