Netbeans无法在MacOSX上启动(Command not Found)

时间:2013-04-08 06:59:19

标签: macos netbeans osx-leopard

我已经在Mac OSX 10.5.8上成功安装了Netbeans 6.0.1,但是当我尝试启动它时它没有,并且这些日志条目都记录在System.log中:

Apr  7 19:35:09 henrique-ordines-macbook [0x0-0x9c09c].NetBeans 6.0.1[53785]: /Applications/NetBeans/NetBeans 6.0.1.app/Contents/MacOS/netbeans: line 48: ls: command not found
Apr  7 19:35:09 henrique-ordines-macbook [0x0-0x9c09c].NetBeans 6.0.1[53785]: /Applications/NetBeans/NetBeans 6.0.1.app/Contents/MacOS/netbeans: line 53: dirname: command not found
Apr  7 19:35:09 henrique-ordines-macbook [0x0-0x9c09c].NetBeans 6.0.1[53785]: /Applications/NetBeans/NetBeans 6.0.1.app/Contents/MacOS/netbeans: line 57: dirname: command not found
Apr  7 19:35:09 henrique-ordines-macbook [0x0-0x9c09c].NetBeans 6.0.1[53785]: Cannot read cluster file: /../etc/netbeans.clusters
Apr  7 19:35:09 henrique-ordines-macbook com.apple.launchd[65] ([0x0-0x9c09c].NetBeans 6.0.1[53785]): Exited with exit code: 1

我已根据建议on this thread使用“磁盘工具”修复了权限,但我仍然遇到同样的错误。

如果我以Root用户身份登录,我可以毫无问题地启动它。

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

正如on this thread所述,发生了“ls command not found”错误,因为我的PATH环境变量已经被破坏了。在我的情况下, uhem ,无论如何,一旦你修复了这个变量,这个部分/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin也可以在PATH变量中,Netbeans就可以了。