alternatives --install gets stuck: failed to read link: No such file or directory


Alternatives utility gets stuck doing install. Fedora 17 x86_64.

Removing the /var/lib/alternatives/javaws file resolved the issue (for me).

# alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.7.0_07/jre/bin/javaws  20000
failed to read link /usr/bin/javaws: No such file or directory


# ls /usr/bin/javaws
ls: cannot access /usr/bin/javaws: No such file or directory


# ls -al /var/lib/alternatives/javaws
-rw-r--r--. 1 root root 105 Sep 22 11:39 /var/lib/alternatives/javaws

# rm /var/lib/alternatives/javaws
rm /var/lib/alternatives/javaws
rm: remove regular file `/var/lib/alternatives/javaws'? y

# alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.7.0_07/jre/bin/javaws  20000

# which javaws
/bin/javaws

# ls /usr/bin/javaws
/usr/bin/javaws


# ls -al /var/lib/alternatives/javaws
-rw-r--r--. 1 root root 65 Sep 22 11:50 /var/lib/alternatives/javaws

# cat /var/lib/alternatives/javaws
auto
/usr/bin/javaws

/usr/java/jdk1.7.0_07/jre/bin/javaws
20000

When updating Java this http://johnglotzer.blogspot.com/2013/01/firefox-pluginregdat-whats-dat.html can come in handy as well.

4 comments

Popular posts from this blog

Hit failing alternator with a hammer to confirm diagnosis of failing alternator due to bad brushes

Fedora 23 Calendar PopDown in DarkGlass Gnome Shell Theme is cut off