[Bug 1285791] Re: Installing default-jdk, uninstalling it, doing apt-get autoremove, and reinstalling it leaves you without /usr/bin/javac ?
Dan Kegel
dank at kegel.com
Thu Feb 27 18:44:28 UTC 2014
Correction: apt-get purge openjdk-6-jdk *after* uninstalling it does not work around it (it refuses to purge
because the package isn't installed).
The correct workaround if you know the package is uninstalled is sudo dpkg --purge openjdk-6-jdk.
The problem is present if the package is not installed but is
configured, e.g. if you see:
$ dpkg-query -l openjdk-6-jdk
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=========================-=========================-==================================================================
rc openjdk-6-jdk 6b27-1.12.6-1ubuntu0.10.0 OpenJDK Development Kit (JDK)
instead of
$ dpkg-query -l openjdk-6-jdk
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=========================-=========================-==================================================================
un openjdk-6-jdk <none> (no description available)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to java-common in Ubuntu.
https://bugs.launchpad.net/bugs/1285791
Title:
Installing default-jdk, uninstalling it, doing apt-get autoremove, and
reinstalling it leaves you without /usr/bin/javac ?
Status in “java-common” package in Ubuntu:
New
Bug description:
To reproduce:
$ sudo lxc-create -t ubuntu -n testbot01-ubu1004-test -- -r lucid
$ sudo lxc-start -n testbot01-ubu1004-test
(log in)
$ sudo apt-get install default-jdk
$ which javac
/usr/bin/javac
$ sudo apt-get remove default-jdk
$ which javac
/usr/bin/javac
$ sudo apt-get autoremove -y
$ which javac
$ sudo apt-get install default-jdk
$ which javac
$ update-java-alternatives -l
java-1.6.0-openjdk 1061 /usr/lib/jvm/java-1.6.0-openjdk
$ sudo update-java-alternatives -a
update-alternatives: error: no alternatives for appletviewer.
update-alternatives: error: no alternatives for extcheck.
...
$ apt-cache policy default-jdk
default-jdk:
Installed: 1.6-34
Candidate: 1.6-34
Version table:
*** 1.6-34 0
500 http://archive.ubuntu.com/ubuntu/ lucid/main Packages
100 /var/lib/dpkg/status
If you save a log on the two 'apt-get install default-jdk' lines,
diffing the two shows:
Setting up openjdk-6-jre-headless (6b27-1.12.6-1ubuntu0.10.04.4) ...
-update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/java to provide /usr/bin/java (java) in auto mode.
...
Setting up openjdk-6-jdk (6b27-1.12.6-1ubuntu0.10.04.4) ...
-update-alternatives: using /usr/lib/jvm/java-6-openjdk/bin/appletviewer to provide /usr/bin/appletviewer (appletviewer) in auto mode.
So evidently there's some sort of postinst / postrm problem that only
shows up on the second install?
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/java-common/+bug/1285791/+subscriptions
More information about the foundations-bugs
mailing list