ubuntu如何卸载oracle,uninstall - 如何完全删除未正确安装的Oracle JDK? - Ubuntu问答...

问题描述

我最近在Ubuntu 12.04 beta上从webupd8ppa安装了一个oracle jdk,但显然无法解决问题,现在,即使从源中停用了ppa,它在每次执行更新或安装时都给我错误。

这是我尝试从USC卸载时得到的:

installArchives() failed: (Reading database ...

(Reading database ... 5%

(Reading database ... 10%

(Reading database ... 15%

(Reading database ... 20%

(Reading database ... 25%

(Reading database ... 30%

(Reading database ... 35%

(Reading database ... 40%

(Reading database ... 45%

(Reading database ... 50%

(Reading database ... 55%

(Reading database ... 60%

(Reading database ... 65%

(Reading database ... 70%

(Reading database ... 75%

(Reading database ... 80%

(Reading database ... 85%

(Reading database ... 90%

(Reading database ... 95%

(Reading database ... 100%

(Reading database ... 295120 files and directories currently installed.)

Removing oracle-java7-installer ...

update-alternatives: error: unknown argument `cdrom'

dpkg: error processing oracle-java7-installer (--remove): subprocess installed pre-removal script returned error exit status 2

No apport report written because MaxReports is reached already

Downloading...

--2012-04-12 13:13:21-- http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-i586.tar.gz

Rsolution de download.oracle.com (download.oracle.com)...

203.13.161.233, 203.13.161.234

Connexion vers download.oracle.com (download.oracle.com)|203.13.161.233|:80... connect. requte HTTP transmise, en attente de la rponse... 302 Moved Temporarily

Emplacement: https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-i586.tar.gz [suivant]

--2012-04-12 13:13:21-- https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-i586.tar.gz

Rsolution de edelivery.oracle.com (edelivery.oracle.com)...

173.223.150.174

Connexion vers edelivery.oracle.com (edelivery.oracle.com)|173.223.150.174|:443... connect. requte HTTP transmise, en attente de la rponse... 302 Moved Temporarily Emplacement: http://download.oracle.com/errors/download-fail-1505220.html [suivant]

--2012-04-12 13:13:22-- http://download.oracle.com/errors/download-fail-1505220.html

Connexion vers download.oracle.com (download.oracle.com)|203.13.161.233|:80... connect. requte HTTP transmise, en attente de la rponse... 200 OK

Longueur: 5307 (5,2K) [text/html]

Sauvegarde en : ./jdk-7u3-linux-i586.tar.gz

0K ..... 100% 4,94M=0,001s

2012-04-12 13:13:22 (4,94 MB/s) - ./jdk-7u3-linux-i586.tar.gz sauvegard [5307/5307]

Download done.

sha256sum mismatch jdk-7u3-linux-i586.tar.gz

Oracle JDK 7 is NOT installed.

dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 1

Errors were encountered while processing: oracle-java7-installer

Error in function:

我也从突触中尝试了”remove completely”,但它也不起作用。

提前谢谢你的帮助!

最佳方案

我在Ubuntu 11.10上遇到了相同的问题,尝试了所有相同的解决方案,但都不对我有用。我在另一个讨论板上找到了它,似乎对我有用:

If you want to remove oracle-jdk7-installer, you can simply go to /var/lib/dpkg/info/ It takes some time to load, and delete all files which starts with oracle-java7***** there was ~6files, then go to Synaptic and simply locate same oracle-jdk and click remove/completly remove.

祝好运!

编辑:这是轻松执行此操作的3个步骤:

打开一个终端(ctrl + alt + T)并依次键入以下两个命令:

cd /var/lib/dpkg/info/

sudo rm oracle-java7-installer*

打开突触,搜索”oracle-java7-installer”,将其标记为完全删除,然后单击”apply”。

编辑:对于那些没有安装突触的服务器,在管理oracle安装程序文件后,只需执行以下操作:

sudo apt-get purge oracle-java7-installer

而且你应该很好。

编辑:也在ubuntu 12.04 LTS上工作

次佳方案

再次添加webupd8 ppa

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java7-installer

打开终端并输入:

sudo apt-get update

sudo apt-get install -f

然后使用ppa purge清除ppa

sudo apt-get install ppa-purge

sudo ppa-purge ppa:webupd8team/java

链接

参考资料

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值