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,如需转载请自行联系原作者
相关文章
|
2月前
|
Ubuntu 编译器 开发工具
在Ubuntu系统上搭建RISC-V交叉编译环境
以上步骤涵盖了在Ubuntu系统上搭建RISC-V交叉编译环境的主要过程。这一过程涉及了安装依赖、克隆源码、编译安装工具链以及设置环境变量等关键步骤。遵循这些步骤,可以在Ubuntu系统上搭建一个用于RISC-V开发的强大工具集。
225 22
|
2月前
|
Ubuntu 网络协议 网络安全
解决Ubuntu系统的网络连接问题
以上步骤通常可以帮助解决大多数Ubuntu系统的网络连接问题。如果问题仍然存在,可能需要更深入的诊断,或考虑联系网络管理员或专业技术人员。
492 18
|
3月前
|
Ubuntu 安全 关系型数据库
安装MariaDB服务器流程介绍在Ubuntu 22.04系统上
至此, 您已经在 Ubuntu 22.04 系统上成功地完成了 MariadB 的标准部署流程,并且对其进行基础但重要地初步配置加固工作。通过以上简洁明快且实用性强大地操作流程, 您现在拥有一个待定制与使用地强大 SQL 数据库管理系统。
249 18
|
3月前
|
Ubuntu 安全 关系型数据库
安装MariaDB服务器流程介绍在Ubuntu 22.04系统上
至此, 您已经在 Ubuntu 22.04 系统上成功地完成了 MariadB 的标准部署流程,并且对其进行基础但重要地初步配置加固工作。通过以上简洁明快且实用性强大地操作流程, 您现在拥有一个待定制与使用地强大 SQL 数据库管理系统。
268 15
|
3月前
|
存储 Ubuntu iOS开发
在Ubuntu 22.04系统上安装libimobiledevice的步骤
为了获取更多功能或者解决可能出现问题,请参考官方文档或者社区提供支持。
183 14
|
3月前
|
Ubuntu
在Ubuntu系统上设置syslog日志轮替与大小限制
请注意,在修改任何系统级别配置之前,请务必备份相应得原始档案并理解每项变更可能带来得影响。
314 2
|
4月前
|
XML Ubuntu Java
如何在Ubuntu系统上安装和配置JMeter和Ant进行性能测试
进入包含 build.xml 的目录并执行:
220 13
|
4月前
|
Ubuntu 机器人 项目管理
Ubuntu系统更换软件源以及ROS包管理问题解析
以上是针对Ubuntu系统软件源的更换和ROS包管理的关键步骤。务必跟随官方指南,在安装或者配置过程中应答疑解惑,确保每一步操作的准确性。这些操作对于机器人研发人员和爱好者来说是日常任务的一部分,熟练掌握这些技能,能够在机器人编程和项目管理方面提供很大的帮助。
294 0
|
4月前
|
缓存 监控 Ubuntu
Ubuntu操作系统下清除系统缓存与无用文件的方法
通过上述步骤断行综合性地对Ubuntu进行优化与整洁可显著改善其性能表现及响应速度。然而,请注意在执行某些操作前确保充分了解其潜在影响;例如,在移除旧内核之前确认新内核稳定运行无问题;而对于关键配置更改则需确保备份好相关设置以便恢复原状态。
652 0