I have follow all the post but unable to solve this problem:
By mistake I deleted the /usr/bin/java
. After installing many time m still getting this error.
After running update-alternatives --display java
I'm getting:
update-alternatives: error: no alternatives for java
update-alternatives --display java
– steeldriver Jun 02 '17 at 19:14dpkg -S /usr/bin/java
says? If it shows the package name, trysudo apt-get purge <package>
, then install it again. – Hi-Angel Jun 02 '17 at 20:55sudo apt-get install --reinstall <PACKAGE>
would be better. – David Foerster Jun 03 '17 at 07:42/usr/bin/java
, so I assumed it's something dowloaded e.g. from Oracle's site. In this case I don't think--reinstall
would help (unless dpkg cached the package?). – Hi-Angel Jun 03 '17 at 10:49