我從Oracle站點(jre-8u25-macosx-x64.dmg
)下載了JRE8。然後我打開dmg
並運行安裝。安裝進度開始,但隨後發生瞭如下錯誤:無法在OS X上安裝JRE8/JRE7優勝美地
The installation failed.
The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
,如果我嘗試安裝JRE7同樣的錯誤。
我也嘗試下載jre-7u71-macosx-x64.tar.gz
並將其解壓縮,但之後Java拒絕正常工作。 java -version
是好的,但下面的代碼打印Unknown
:
System.out.println(System.getProperty("os.name"));
這是很奇怪的。有沒有人遇到同樣的問題?
更新1
我跑sudo diskutil repairPermissions /
然後我再次運行安裝程序,並按下⌘ + L
。該日誌:
installd[438]: PackageKit: ----- Begin install -----
installd[438]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package 「Java 8 Update 25.pkg」." UserInfo=0x7f8442b3a440 {NSFilePath=./postinstall, NSURL=file://localhost/Volumes/Java%208%20Update%2025/Java%208%20Update%2025.pkg#javaappletplugin.pkg, PKInstallPackageIdentifier=com.oracle.jre, NSLocalizedDescription=An error occurred while running scripts from the package 「Java 8 Update 25.pkg」.} {
NSFilePath = "./postinstall";
NSLocalizedDescription = "An error occurred while running scripts from the package \U201cJava 8 Update 25.pkg\U201d.";
NSURL = "file://localhost/Volumes/Java%208%20Update%2025/Java%208%20Update%2025.pkg#javaappletplugin.pkg";
PKInstallPackageIdentifier = "com.oracle.jre";
}
Installer[1667]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
Installer[1667]: Displaying 'Install Failed' UI.
Installer[1667]: 'Install Failed' UI displayed message:'The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'.
嘗試使用DiskUtility修復磁盤權限,然後再次運行安裝程序。如果問題仍然存在,請不要關閉安裝程序,而是按下'Command-L'(⌘L)'併發布日誌結果。 –
@ l'l l我做了你所說的一切 – ZhekaKozlov
@ l'l l你的意思是pkg,而不是dmg?我運行'md5/Users//Desktop/Java \ 8 \ Update \ 25.pkg',得到了不同的總和,而不是'2a93 ...'(我得到了'90f4 ...') –
ZhekaKozlov