Scala,在 Maverick 上安装 Scala 2.8.1 时出现问题
我将 izpack 安装程序 Scala 2.8.1 安装在 /usr/local/scala 并在 etc/environment 设置环境变量后,它可以正常执行 scala 或 scalac 等命令,但如果我使用 sudo 执行 sbaz,则会显示错误消息就像
sudo: sbaz: command not found
所以我尝试在没有 sudo 的情况下执行 sbaz-setup new_sbaz_directory ,但是在我尝试执行类似命令之后,
sbaz install sbt
错误再次显示,例如
java.io.FileNotFoundException: /usr/local/scala/meta/.lock (Permission denied)
为什么 sbaz执行 sbaz-setup 命令后没有指向我的 sbaz_directory ?我的问题有什么解决办法吗?谢谢
i've izpack installer Scala 2.8.1 after install it at /usr/local/scala and set environment variable at etc/environment it's work normally for execute command like scala or scalac, but if i execute sbaz with sudo, the error message show like
sudo: sbaz: command not found
So i try to execute sbaz-setup new_sbaz_directory without sudo, but after i tried to execute command like
sbaz install sbt
Again the error show like
java.io.FileNotFoundException: /usr/local/scala/meta/.lock (Permission denied)
Why the sbaz not pointing to my sbaz_directory after execute sbaz-setup command ? Is there any solution for my problem ? Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道问题的原因,可能是 JVM 或 Scala 崩溃留下了 .lock 文件。
您可以通过更改 .lock 文件的权限让 sbaz 再次工作,当 sbaz 重新运行时该文件将被删除:
then :
允许文件的 777 权限看起来很可怕,但我没有找到任何其他删除方法.lock 文件而不是让 sbaz 运行并自行删除它......
I don't know the cause of the problem, likely a JVM or Scala crash which left a .lock file.
You can get sbaz to work again by changing the permissions on the .lock file, which will then be deleted when sbaz will run anew :
then :
Allowing 777 permission on the file looks scary, but I didn't find any other way to delete the .lock file than by letting sbaz run and delete it by itself...