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/p/7080019.html,如需转载请自行联系原作者
相关文章
|
28天前
|
并行计算 PyTorch TensorFlow
Ubuntu安装笔记(一):安装显卡驱动、cuda/cudnn、Anaconda、Pytorch、Tensorflow、Opencv、Visdom、FFMPEG、卸载一些不必要的预装软件
这篇文章是关于如何在Ubuntu操作系统上安装显卡驱动、CUDA、CUDNN、Anaconda、PyTorch、TensorFlow、OpenCV、FFMPEG以及卸载不必要的预装软件的详细指南。
2554 3
|
22天前
|
Ubuntu Linux 测试技术
Linux系统之Ubuntu安装cockpit管理工具
【10月更文挑战第13天】Linux系统之Ubuntu安装cockpit管理工具
79 4
Linux系统之Ubuntu安装cockpit管理工具
|
1月前
|
Ubuntu 测试技术 网络安全
Ubuntu系统下部署flatpress轻量级博客系统
【10月更文挑战第3天】Ubuntu系统下部署flatpress轻量级博客系统
44 3
Ubuntu系统下部署flatpress轻量级博客系统
|
16天前
|
Ubuntu 编译器 计算机视觉
Ubuntu系统编译OpenCV4.8源码
【10月更文挑战第17天】只要三步即可搞定,第一步是下载指定版本的源码包;第二步是安装OpenCV4.8编译需要的编译器与第三方库支持;第三步就是编译OpenCV源码包生成安装文件并安装。
|
27天前
|
Ubuntu Linux Python
Ubuntu学习笔记(六):ubuntu切换Anaconda和系统自带Python
本文介绍了在Ubuntu系统中切换Anaconda和系统自带Python的方法。方法1涉及编辑~/.bashrc和/etc/profile文件,更新Anaconda的路径。方法2提供了详细的步骤指导,帮助用户在Anaconda和系统自带Python之间进行切换。
68 1
|
29天前
|
Python
Jetson环境安装(二):ubuntu18.0卸载和安装python3
在Jetson Nano上如何卸载Python 3.7并重新安装Python 3.7.0版本的详细步骤,包括卸载命令、安装依赖库、下载和编译Python源码以及建立软链接等。
44 2
|
9天前
|
消息中间件 Ubuntu Java
Ubuntu系统上安装Apache Kafka
Ubuntu系统上安装Apache Kafka
|
1月前
|
存储 安全 开发工具
百度公共IM系统的Andriod端IM SDK组件架构设计与技术实现
本文主要介绍了百度公共IM系统的Andriod端IM SDK的建设背景、IM SDK主要结构和工作流程以及建设过程遇到的问题和解决方案。
49 3
|
1月前
|
Ubuntu Shell API
Ubuntu 64系统编译android arm64-v8a 的openssl静态库libssl.a和libcrypto.a
Ubuntu 64系统编译android arm64-v8a 的openssl静态库libssl.a和libcrypto.a
|
1月前
|
Ubuntu jenkins 持续交付
Ubuntu系统 用docker安装jenkins
Ubuntu系统 用docker安装jenkins