我已经安装了(手动,从 .bin 文件)来自 oracle 的最新 jre(版本 6 更新 30),现在我想删除 openjdk-6-jre。但是,apt 强制我安装旧版本(版本 6 更新 26)sun-java6-jre!那么,我可以删除 openjdk-6-jre(和 icedtea 插件)而不安装 sun-java6-jre 吗?或者尝试删除 openjdk-6-jre 是否很简单,因为它“无害”?
sudo apt-get remove openjdk-6-jre-headless
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
sun-java6-bin sun-java6-jre
Suggested packages:
sun-java6-plugin ia32-sun-java6-plugin sun-java6-fonts ttf-kochi-gothic
ttf-sazanami-gothic ttf-kochi-mincho ttf-sazanami-mincho ttf-arphic-uming
The following packages will be REMOVED:
default-jre default-jre-headless icedtea-6-jre-cacao
libcommons-beanutils-java libcommons-digester-java openjdk-6-jre
openjdk-6-jre-headless openjdk-6-jre-lib
The following NEW packages will be installed:
sun-java6-bin sun-java6-jre
0 upgraded, 2 newly installed, 8 to remove and 0 not upgraded.
Need to get 0B/35,1MB of archives.
After this operation, 12,3MB of additional disk space will be used.
Do you want to continue [Y/n]?
答案1
sudo apt-get remove openjdk-6-jre-headless sun-java6-bin sun-java6-jre
当然,这也会删除所有依赖于 JRE 包的包。如果您希望能够使用它们,则需要创建一个虚拟 JRE 包,并使用equivs
。
因此,保留已安装的打包 JRE 可能更容易。