-1

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

Agung Prasetyo
  • 4,353
  • 5
  • 29
  • 37
  • Maybe installation using sudo or as a normal user can make a difference - thus you can try the other variant, if you haven't tried both already. – Antonin Brettsnajdr Apr 20 '11 at 18:24

1 Answers1

1

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 :

    sudo chmod 777 /usr/local/scala/meta/.lock

then :

    sbaz install sbt

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...

Alex Repain
  • 93
  • 1
  • 5