我从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