gpt4 book ai didi

java - 无法在 Mac OS Yosemite 上安装 JDK 8u25

转载 作者:太空宇宙 更新时间:2023-11-04 06:19:04 27 4
gpt4 key购买 nike

尝试遵循 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 25Dec 29 10:44:33 buddy.fritz.box installer[11031] : Product archive /Volumes/JDK 8 Update 25/JDK 8 Update 25.pkg trustLevel=202installer: Installing at base path /installer: Preparing for installation….....Dec 29 10:44:34 buddy.fritz.box installer[11031] : -[IFDInstallController(Private) _buildInstallPlan]: location = file://localhostDec 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.pkgDec 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.pkgDec 29 10:44:34 buddy.fritz.box installer[11031] : Set authorization level to root for sessionDec 29 10:44:34 buddy.fritz.box installer[11031] : Will use PK sessionDec 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 IFPKInstallElementinstaller: 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.)

非常感谢任何帮助

最佳答案

做了更多研究来解决这个问题,我想我调查了包内容( 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 本身

然后我运行了包中的 preinstallpostinstall 脚本,显示了以下输出

/tmp/java/jdk/javaappletplugin.pkg/Scripts12: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 progressobjc[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

I could now see that the Script is unable to finish its Installation. After I have moved the existing plugin out of the way

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 25Dec 29 12:10:58 buddy.fritz.box installer[12459] : Product archive /Volumes/JDK 8 Update 25/JDK 8 Update 25.pkg trustLevel=202installer: Installing at base path /installer: Preparing for installation….....Dec 29 12:10:59 buddy.fritz.box installer[12459] : -[IFDInstallController(Private) _buildInstallPlan]: location = file://localhostDec 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.pkgDec 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.pkgDec 29 12:10:59 buddy.fritz.box installer[12459] : Set authorization level to root for sessionDec 29 12:11:00 buddy.fritz.box installer[12459] : Will use PK sessionDec 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 IFPKInstallElementinstaller: 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] loadedDec 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 0Dec 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 0Dec 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 actionsinstaller: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 componentsDec 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 timeDec 29 12:11:06 buddy.fritz.box installer[12459] : -----------------------------Dec 29 12:11:06 buddy.fritz.box installer[12459] :        disk      0.05 secondsDec 29 12:11:06 buddy.fritz.box installer[12459] :      script      0.00 secondsDec 29 12:11:06 buddy.fritz.box installer[12459] :        zero      0.01 secondsDec 29 12:11:06 buddy.fritz.box installer[12459] :     install      6.08 secondsDec 29 12:11:06 buddy.fritz.box installer[12459] :     -total-      6.14 secondsDec 29 12:11:06 buddy.fritz.box installer[12459] :installer:#installer: The software was successfully installed......installer: The install was successful.

我希望这对其他人来说也能成功

关于java - 无法在 Mac OS Yosemite 上安装 JDK 8u25,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27686593/

27 4 0