linux下rpm安装和卸载jdk

安装jdk-7u21:rpm -ivh rpm -ivh jdk-7u21-linux-x64.rpm
安装时出现如下错误,提示文件冲突,表明正在安装的jdk-7u21和已安装的jdk-7u79冲突:
file /etc/init.d/jexec from install of jdk-2000:1.7.0_21-fcs.x86_64 conflicts with file from package jdk-2000:1.7.0_79-fcs.x86_64

查看已安装的jdk:rpm -qa|grep jdk

卸载掉冲突的jdk:rpm -e --nodeps jdk-1.7.0_79-fcs.x86_64

重新安装jdk-7u21 :rpm -ivh rpm -ivh jdk-7u21-linux-x64.rpm
linux下rpm安装和卸载jdk_第1张图片

查看当前安装的jdk:rpm -qa|grep jdk

你可能感兴趣的:(jdk,linux,rpm)