简体   繁体   English

无法在Mac OS 10.7上安装netbeans

[英]Can't Install netbeans on Mac OS 10.7

Just got a brand new mac. 刚买了一个全新的mac。

However when I try to install netbeans 7.0.1, I get to the part of the installation where it wants me to select a destination to install. 但是,当我尝试安装netbeans 7.0.1时,我会进入安装的一部分,它要我选择要安装的目标。 But it says "Netbeans 7.0.1 cannot be installed on this disk. This software can be installed and work only with Java 6." 但它说“Netbeans 7.0.1无法安装在这个磁盘上。这个软件可以安装并只能用于Java 6.”

I have installed the new 10.7 JDK from apples developer website here: 我在这里从apple开发者网站安装了新的10.7 JDK:

http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wo/5.1.17.2.1.3.3.1.0.1.1.0.3.10.3.3.1 http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wo/5.1.17.2.1.3.3.1.0.1.1.0.3.10.3.3.1

But I am still getting the message. 但我仍然收到消息。

What am I missing here. 我在这里想念的是什么

I had the same problem. 我有同样的问题。 Worse, I could not install the system JVM after installing the developer preview. 更糟糕的是,在安装开发人员预览后,我无法安装系统JVM。 After some digging, it seems the developer preview creates a broken symbolic link to CurrentJDK. 经过一番挖掘后,开发人员预览似乎会创建一个到CurrentJDK的符号链接。 To fix: 修理:

cd /System/Library/Frameworks/JavaVM.framework/Versions
rm CurrentJDK
sudo ln -s /Library/Java/JavaVirtualMachines/1.6.0_27-b07-395.jdk/Contents/Home CurrentJDK

This is partially the Netbeans installer's fault as well. 这也是Netbeans安装程序的错误。 It hasn't been updated yet to the newer JDK path style that Apple introduced a while ago (/Library/Java/JavaVirtualMachines). 它还没有更新到Apple不久前推出的更新的JDK路径样式(/ Library / Java / JavaVirtualMachines)。

Forgot to install java developer tools. 忘了安装java开发人员工具。 The Java Developer Tools are available from the Apple developer downloads site, or Oracle. Java开发人员工具可从Apple开发人员下载站点或Oracle获得。

OSX lion does not come with java developer toolkit pre-installed. OSX Lion没有预先安装java开发人员工具包。

Tnx allot @jsravn for your solution . Tnx分配@jsravn为您的解决方案 Still i wanted to add more info because I'm still on Snow leopard (latest is 10.6.8) but encountered this same problem. 我仍然想添加更多信息,因为我还在使用Snow leopard(最新版本为10.6.8),但遇到了同样的问题。

Although Netbeans uses the default installer, their installation uses unpack200 a Java Command. 尽管Netbeans使用默认安装程序,但它们的安装使用unpack200和Java Command。 This was causing the fatal error. 这导致致命错误。 I found this when looking at /var/log/install.log: 我在查看/var/log/install.log时发现了这个:

   [truncated]
   /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/unpack200: No such file or directory 

The Solution is to symlink CurrentJDK to the newer JDK. 解决方案是将CurrentJDK符号链接到较新的JDK。 (similar to @jsravn) (类似于@jsravn)

cd /System/Library/Frameworks/JavaVM.framework/Versions
mv CurrentJDK CurrentJDK_old
sudo ln -s /Library/Java/JavaVirtualMachines/1.6.0_27-b07-395.jdk/Contents CurrentJDK

But as you can read the error log the symlink should end in Contents 但是,由于您可以阅读错误日志,因此符号链接应以内容结尾

I believe this is introduced by the "Java 6 update" by Apple software updates. 我相信这是由Apple软件更新的“Java 6更新”引入的。 target versions are Mac OSX 10.6.* or greater 目标版本是Mac OSX 10.6。*或更高版本

Note that it is odd that Apple did not update the symlink themselves. 请注意,Apple没有自己更新符号链接,这很奇怪。 It may be wise to restore the CurrentJDK symlink afterwards. 之后恢复CurrentJDK符号链接可能是明智之举。

There are related posts on that subject in StackOverflow and, as I'm facing the same issue, I guess that Netbeans is not finding JDK on your system (as well as on mine...) StackOverflow中有关于该主题的相关帖子,因为我面临同样的问题,我猜Netbeans没有在你的系统上找到JDK(以及我的...)

As mentioned by many people JDK is no more part of OS X Lion, but has to be installed and there are 2 versions: one from developer site and one that is uploaded by "Mac update" when needed. 正如许多人所提到的,JDK不再是OS X Lion的一部分,但必须安装,有两个版本:一个来自开发者网站,一个是在需要时通过“Mac更新”上传的。

I had no trouble using Netbeans with the second one as it does not install in the same directories. 我没有使用Netbeans和第二个,因为它没有安装在相同的目录中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM