尝试遵循Unable to install JRE8/JRE7 on OS X Yosemite上的建议我仍然遇到无法在我的计算机上安装JDK 8u25的问题。这是安装程序日志
10:44 $ sudo installer -dumplog -verbose -pkg /Volumes/JDK\ 8\ Update\ 25/JDK\ 8\ Update\ 25.pkg -target / installer: Package name is JDK 8 Update 25 Dec 29 10:44:33 buddy.fritz.box installer[11031] : Product archive /Volumes/JDK 8 Update 25/JDK 8 Update 25.pkg trustLevel=202 installer: Installing at base path / installer: Preparing for installation…..... Dec 29 10:44:34 buddy.fritz.box installer[11031] : -[IFDInstallController(Private) _buildInstallPlan]: location = file://localhost Dec 29 10:44:34 buddy.fritz.box installer[11031] : -[IFDInstallController(Private) _buildInstallPlan]: file://localhost/Volumes/JDK%208%20Update%2025/JDK%208%20Update%2025.pkg#jdk18025.pkg Dec 29 10:44:34 buddy.fritz.box installer[11031] : -[IFDInstallController(Private) _buildInstallPlan]: file://localhost/Volumes/JDK%208%20Update%2025/JDK%208%20Update%2025.pkg#javaappletplugin.pkg Dec 29 10:44:34 buddy.fritz.box installer[11031] : Set authorization level to root for session Dec 29 10:44:34 buddy.fritz.box installer[11031] : Will use PK session Dec 29 10:44:34 buddy.fritz.box installer[11031] : Starting installation: installer: Preparing the disk…..... Dec 29 10:44:34 buddy.fritz.box installer[11031] : Configuring volume "Macintosh HD" Dec 29 10:44:34 buddy.fritz.box installer[11031] : Preparing disk for local booted install. Dec 29 10:44:34 buddy.fritz.box installer[11031] : Free space on "Macintosh HD": 67.29 GB (67294580736 bytes). Dec 29 10:44:34 buddy.fritz.box installer[11031] : Create temporary directory "/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T//Install.11031P0FtDl" installer: Preparing JDK 8 Update 25…..... Dec 29 10:44:34 buddy.fritz.box installer[11031] : IFPKInstallElement (2 packages) Dec 29 10:44:34 buddy.fritz.box installer[11031] : Using authorization level of root for IFPKInstallElement installer: Waiting for other installations to complete…..... Dec 29 10:44:34 buddy.fritz.box installer[11031] : PackageKit: Enqueuing install with framework-specified quality of service (utility) installer: Configuring the installation…..... installer: # installer: Writing files…..... # installer: Writing files…..... # installer: Writing files…..... # installer: Writing files…..... # installer: Writing files…..... # installer: Moving items into place…..... # installer: Moving items into place…..... installer: Validating packages…..... installer: Cleaning up…..... Dec 29 10:44:39 buddy.fritz.box installer[11031] : install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “JDK 8 Update 25.pkg”." UserInfo=0x7f98f0902080 {NSFilePath=./postinstall, NSURL=file://localhost/Volumes/JDK%208%20Update%2025/JDK%208%20Update%2025.pkg#javaappletplugin.pkg, PKInstallPackageIdentifier=com.oracle.jre, NSLocalizedDescription=An error occurred while running scripts from the package “JDK 8 Update 25.pkg”.} #Dec 29 10:44:39 buddy.fritz.box installer[11031] : Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
非常感谢任何帮助
答案 0 :(得分:1)
做一些更多的研究来解决这个问题,我想我调查了包内容(https://apple.stackexchange.com/questions/15658/how-can-i-open-a-pkg-file-manually揭示了如何提取pkg文件)
11:27 $ pkgutil --expand /Volumes/JDK\ 8\ Update\ 25/JDK\ 8\ Update\ 25.pkg /tmp/java/jdk
查看包并再次查看日志,向我显示问题是在javaappletplugin.pkg
而不是JDK本身
然后我从包中运行了preinstall
和postinstall
脚本,它显示了以下输出
/tmp/java/jdk/javaappletplugin.pkg/Scripts 12:08 $ sudo ./postinstall /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/com.oracle.java.Java-Updater.plist: Operation already in progress /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/com.oracle.java.Helper-Tool.plist: Operation already in progress objc[12239]: Class JavaLaunchHelper is implemented in both /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java and /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/./libjli.dylib. One of the two will be used. Which one is undefined. java.lang.IllegalArgumentException: Invalid argument CFG_FILE: /Library/Application Support/Oracle/Java/java.settings.cfg at com.oracle.install.InstallOptions.validateConfigFile(InstallOptions.java:165) at com.oracle.install.InstallOptions.parseArguments(InstallOptions.java:102) at com.oracle.install.InstallOptions.main(InstallOptions.java:46) /tmp/java/jdk/javaappletplugin.pkg/Scripts
我现在可以看到脚本无法完成其安装。在我将现有插件移开之后
sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/ /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin.old
重新运行postinstall
脚本,错误消失了,我想让我们再试一下安装程序
/tmp/java/jdk/javaappletplugin.pkg/Scripts
12:10 $ sudo ./postinstall
rm: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Info.plist: No such file or directory
并且安装成功完成了
12:10 $ sudo installer -dumplog -verbose -pkg /Volumes/JDK\ 8\ Update\ 25/JDK\ 8\ Update\ 25.pkg -target / installer: Package name is JDK 8 Update 25 Dec 29 12:10:58 buddy.fritz.box installer[12459] : Product archive /Volumes/JDK 8 Update 25/JDK 8 Update 25.pkg trustLevel=202 installer: Installing at base path / installer: Preparing for installation…..... Dec 29 12:10:59 buddy.fritz.box installer[12459] : -[IFDInstallController(Private) _buildInstallPlan]: location = file://localhost Dec 29 12:10:59 buddy.fritz.box installer[12459] : -[IFDInstallController(Private) _buildInstallPlan]: file://localhost/Volumes/JDK%208%20Update%2025/JDK%208%20Update%2025.pkg#jdk18025.pkg Dec 29 12:10:59 buddy.fritz.box installer[12459] : -[IFDInstallController(Private) _buildInstallPlan]: file://localhost/Volumes/JDK%208%20Update%2025/JDK%208%20Update%2025.pkg#javaappletplugin.pkg Dec 29 12:10:59 buddy.fritz.box installer[12459] : Set authorization level to root for session Dec 29 12:11:00 buddy.fritz.box installer[12459] : Will use PK session Dec 29 12:11:00 buddy.fritz.box installer[12459] : Starting installation: installer: Preparing the disk…..... Dec 29 12:11:00 buddy.fritz.box installer[12459] : Configuring volume "Macintosh HD" Dec 29 12:11:00 buddy.fritz.box installer[12459] : Preparing disk for local booted install. Dec 29 12:11:00 buddy.fritz.box installer[12459] : Free space on "Macintosh HD": 66.84 GB (66840113152 bytes). Dec 29 12:11:00 buddy.fritz.box installer[12459] : Create temporary directory "/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T//Install.12459GS2WWn" installer: Preparing JDK 8 Update 25…..... Dec 29 12:11:00 buddy.fritz.box installer[12459] : IFPKInstallElement (2 packages) Dec 29 12:11:00 buddy.fritz.box installer[12459] : Using authorization level of root for IFPKInstallElement installer: Waiting for other installations to complete…..... Dec 29 12:11:00 buddy.fritz.box installer[12459] : PackageKit: Enqueuing install with framework-specified quality of service (utility) installer: Configuring the installation…..... installer: # installer: Writing files…..... # installer: Writing files…..... # installer: Writing files…..... # installer: Writing files…..... # installer: Writing files…..... # installer: Writing files…..... # installer: Moving items into place…..... # installer: Running package scripts…..... # installer: Running package scripts…..... # installer: Running package scripts…..... installer: Validating packages…..... Dec 29 12:11:05 buddy.fritz.box installer[12459] : LSExceptions [0x7fcab0a52670] loaded Dec 29 12:11:05 buddy.fritz.box installer[12459] : PackageKit: Registered bundle file:///Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/lib/missioncontrol/Java%20Mission%20Control.app/ for uid 0 Dec 29 12:11:06 buddy.fritz.box installer[12459] : PackageKit: Registered bundle file:///Library/Internet%20Plug-Ins/JavaAppletPlugin.plugin/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/ for uid 0 Dec 29 12:11:06 buddy.fritz.box installer[12459] : PackageKit: Registered bundle file:///Library/Internet%20Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/Java%20Updater.app/ for uid 0 # installer: Running installer actions… Dec 29 12:11:06 buddy.fritz.box installer[12459] : Running install actions installer: installer: Finishing the Installation…..... Dec 29 12:11:06 buddy.fritz.box installer[12459] : Removing temporary directory "/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T//Install.12459GS2WWn" Dec 29 12:11:06 buddy.fritz.box installer[12459] : Finalize disk "Macintosh HD" Dec 29 12:11:06 buddy.fritz.box installer[12459] : Notifying system of updated components Dec 29 12:11:06 buddy.fritz.box installer[12459] : Dec 29 12:11:06 buddy.fritz.box installer[12459] : **** Summary Information **** Dec 29 12:11:06 buddy.fritz.box installer[12459] : Operation Elapsed time Dec 29 12:11:06 buddy.fritz.box installer[12459] : ----------------------------- Dec 29 12:11:06 buddy.fritz.box installer[12459] : disk 0.05 seconds Dec 29 12:11:06 buddy.fritz.box installer[12459] : script 0.00 seconds Dec 29 12:11:06 buddy.fritz.box installer[12459] : zero 0.01 seconds Dec 29 12:11:06 buddy.fritz.box installer[12459] : install 6.08 seconds Dec 29 12:11:06 buddy.fritz.box installer[12459] : -total- 6.14 seconds Dec 29 12:11:06 buddy.fritz.box installer[12459] : installer: # installer: The software was successfully installed...... installer: The install was successful.
我希望这对其他人也是成功的