打赏

Ubuntu系统里如何正确卸载oracle-j2sdk1.6(图文详解)

 

 

 

  问题来源

  因为,我在安装clouder manager5.X的时候,默认是需要oracle-j2sdk1.7。

  它4.X时,才是1.6的。

 

 

 

  若你还是在用clouder manager4.X版本的话,需要用到oracle-j2sdk1.6

则,见

http://download.csdn.net/download/nma_123456/8976865

 

 

 

 

  

 

   

  为此,需要卸载它,再来安装

bigdata@ubuntucmbigdata1:/var/log/cloudera-manager-installer$ dpkg --list | grep -i jdk
ii  oracle-j2sdk1.6                                       1.6.0+update31                                      amd64        Java(TM) JDK, Standard Edition, Oracle(TM)
bigdata@ubuntucmbigdata1:/var/log/cloudera-manager-installer$ sudo apt-get remove oracle-j2sdk1.6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libstdc++5
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  oracle-j2sdk1.6
0 upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
1 not fully installed or removed.
After this operation, 230 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 193100 files and directories currently installed.)
Removing oracle-j2sdk1.6 (1.6.0+update31) ...
Setting up cloudera-manager-server (5.11.1-1.cm5111.p0.9~trusty-cm5) ...
chown: cannot access ‘/var/lib/cloudera-scm-server/’: No such file or directory
dpkg: error processing package cloudera-manager-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 cloudera-manager-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
bigdata@ubuntucmbigdata1:/var/log/cloudera-manager-installer$ dpkg --list | grep -i jdk
bigdata@ubuntucmbigdata1:/var/log/cloudera-manager-installer$ 

 

 

 

 

 

 

 

 

 

 

 

  解决办法

bigdata@ubuntucmbigdata3:/usr/java$ dpkg --list | grep -i jdk
ii  oracle-j2sdk1.6                                       1.6.0+update31                                      amd64        Java(TM) JDK, Standard Edition, Oracle(TM)
iF  oracle-java7-installer                                7u80+7u60arm-0~webupd8~1                            all          Oracle Java(TM) Development Kit (JDK) 7
iU  oracle-java7-set-default                              7u80+7u60arm-0~webupd8~1                            all          Set Oracle JDK 7 as default Java
bigdata@ubuntucmbigdata3:/usr/java$ sudo apt-get remove oracle-j2sdk1.6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libntdb1 libstdc++5 python-ntdb
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  oracle-j2sdk1.6
0 upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
2 not fully installed or removed.
After this operation, 230 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 177145 files and directories currently installed.)
Removing oracle-j2sdk1.6 (1.6.0+update31) ...
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
Downloading Oracle Java 7...
--2017-06-26 13:01:34--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.2.16.218, 23.2.16.208
Connecting to download.oracle.com (download.oracle.com)|23.2.16.218|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]
--2017-06-26 13:01:35--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 184.28.37.127, 2402:4f00:4001:197::2d3e, 2402:4f00:4001:180::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|184.28.37.127|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1498453415_f4abdac1cfd99129c88b2f3935796ed1 [following]
--2017-06-26 13:01:35--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1498453415_f4abdac1cfd99129c88b2f3935796ed1
Connecting to download.oracle.com (download.oracle.com)|23.2.16.218|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-06-26 13:01:36 ERROR 404: Not Found.

download failed
Oracle JDK 7 is NOT installed.
dpkg: error processing package oracle-java7-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of oracle-java7-set-default:
 oracle-java7-set-default depends on oracle-java7-installer; however:
  Package oracle-java7-installer is not configured yet.

dpkg: error processing package oracle-java7-set-default (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 oracle-java7-installer
 oracle-java7-set-default
E: Sub-process /usr/bin/dpkg returned an error code (1)
bigdata@ubuntucmbigdata3:/usr/java$ dpkg --list | grep -i jdk
iF  oracle-java7-installer                                7u80+7u60arm-0~webupd8~1                            all          Oracle Java(TM) Development Kit (JDK) 7
iU  oracle-java7-set-default                              7u80+7u60arm-0~webupd8~1                            all          Set Oracle JDK 7 as default Java
bigdata@ubuntucmbigdata3:/usr/java$ 

 

 

 

 

 

 

 

 

 

 

 

 

欢迎大家,加入我的微信公众号:大数据躺过的坑     免费给分享
 
 
 

同时,大家可以关注我的个人博客

   http://www.cnblogs.com/zlslch/   和  http://www.cnblogs.com/lchzls/ 

 

  人生苦短,我愿分享。本公众号将秉持活到老学到老学习无休止的交流分享开源精神,汇聚于互联网和个人学习工作的精华干货知识,一切来于互联网,反馈回互联网。
  目前研究领域:大数据、机器学习、深度学习、人工智能、数据挖掘、数据分析。 语言涉及:Java、Scala、Python、Shell、Linux等 。同时还涉及平常所使用的手机、电脑和互联网上的使用技巧、问题和实用软件。 只要你一直关注和呆在群里,每天必须有收获

 

       以及对应本平台的QQ群:161156071(大数据躺过的坑)

 

 

 

 

 

 

 

 

 

 

 

posted @ 2017-06-26 13:05  大数据和AI躺过的坑  阅读(1939)  评论(0编辑  收藏  举报