[记录]mac下卸载java 6

[背景]
折腾:
期间,需要先卸载mac中的java 6。
licrifandeMacBook-Pro:~ crifan$ ls /System/Library/Java/
Extensions/ Support/
licrifandeMacBook-Pro:~ crifan$ ls /System/Library/Java/Extensions/
AppleScriptEngine.jar        j3dutils.jar                 libJ3DAudio.jnilib
MRJToolkit.jar               jai_codec.jar                libJ3DUtils.jnilib
dns_sd.jar                   jai_core.jar                 libmlib_jai.jnilib
j3daudio.jar                 libAppleScriptEngine.jnilib  mlibwrapper_jai.jar
j3dcore.jar                  libJ3D.jnilib                vecmath.jar
licrifandeMacBook-Pro:~ crifan$ ls /System/Library/Java/Support/
CoreDeploy.bundle/ Deploy.bundle/
licrifandeMacBook-Pro:~ crifan$ ls /System/Library/Java/Support/
没找到那个:
/System/Library/Java/JavaVirtualMachines
结果即使去删除:
sudo rm -rf /System/Library/Frameworks/JavaVM.framework/
结果也没有权限:
rm JavaVM.framework opeation not permitted
licrifandeMacBook-Pro:~ crifan$ pkgutil --pkgs=.*Java.*
com.apple.pkg.JavaEssentials
com.apple.pkg.JavaForMacOSX107
com.apple.pkg.JavaMDNS
com.apple.pkg.JavaSecurity
licrifandeMacBook-Pro:~ crifan$
结果也都无法删除:
licrifandeMacBook-Pro:~ crifan$ sudo pkgutil --forget com.apple.pkg.JavaEssentials
Unknown error Error Domain=NSCocoaErrorDomain Code=4 "“com.apple.pkg.JavaEssentials.bom” couldn’t be removed." UserInfo={NSFilePath=/var/db/receipts/com.apple.pkg.JavaEssentials.bom, NSUserStringVariant=(
    Remove
), NSUnderlyingError=0x7ffb60d19170 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}.
Forgot package 'com.apple.pkg.JavaEssentials' on '/'.
licrifandeMacBook-Pro:~ crifan$ sudo pkgutil --forget com.apple.pkg.JavaForMacOSX107
Unknown error Error Domain=NSCocoaErrorDomain Code=4 "“com.apple.pkg.JavaForMacOSX107.bom” couldn’t be removed." UserInfo={NSFilePath=/var/db/receipts/com.apple.pkg.JavaForMacOSX107.bom, NSUserStringVariant=(
    Remove
), NSUnderlyingError=0x7fc809406df0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}.
Forgot package 'com.apple.pkg.JavaForMacOSX107' on '/'.

licrifandeMacBook-Pro:~ crifan$

算了,不去删除了。



发表评论

电子邮件地址不会被公开。 必填项已用*标注

无觅相关文章插件,快速提升流量