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

查看當前安裝的jdk:rpm -qa|grep jdk node

相關文章
相關標籤/搜索