0
votes

I would like to learn clojure and installed it via Leiningen. Startup fails [see below].

Question: how can I start Clojure?

Details: Xubuntu 14.04 LTS 64, java-1.7.0-openjdk-amd64 1071 /usr/lib/jvm/java-1.7.0-openjdk-amd64.

Message at startup:

henk@henk-System-Product-Name:~$ lein repl
nREPL server started on port 46904 on host 127.0.0.1
REPL-y 0.3.0
Clojure 1.5.1
Docs: (doc function-name-here)
      (find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e

user=> Exception in thread "Thread-4" java.io.FileNotFoundException: /home/henk/.lein    /repl-port (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at clojure.java.io$fn__8640.invoke(io.clj:234)
at clojure.java.io$fn__8564$G__8540__8571.invoke(io.clj:73)
at clojure.java.io$fn__8614.invoke(io.clj:170)
at clojure.java.io$fn__8590$G__8544__8597.invoke(io.clj:73)
at clojure.java.io$writer.doInvoke(io.clj:123)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$spit.doInvoke(core.clj:6291)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at user$eval540.invoke(NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.eval(Compiler.java:6609)
at clojure.lang.Compiler.eval(Compiler.java:6582)
at clojure.core$eval.invoke(core.clj:2852)
at leiningen.core.eval$fn__3577.invoke(eval.clj:304)
at clojure.lang.MultiFn.invoke(MultiFn.java:231)
at leiningen.core.eval$eval_in_project.invoke(eval.clj:326)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.repl$server$fn__7443.invoke(repl.clj:201)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:617)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1788)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:621)
at clojure.core$bound_fn_STAR_$fn__4102.doInvoke(core.clj:1810)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Thread.java:744)
1
what version of lein are you on? try doing lein clean and then rm .lein-repl-history. if that doesn't help try uninstalling lein and installing the latest version. - Jake Johnson
I have downloaded lein yesterday, so it is the newest version. I have just reinstalled it now. lein clean gives "Couldn't find project.clj, which is needed for clean" [also after doing "lein new app clojure-noob". Can this be something with Java? - Henk
The problem appears to be that the files that lein needs don't have the correct permissions. as seen here: /home/henk/.lein /repl-port (Permission denied). you'll notice by doing a search that there is an open issue for something that looks very similar to what you are experiencing here: github.com/wuub/SublimeREPL/issues/107 Perhaps one of the solutions there will help you solve this. - Jake Johnson
I have looked at the thread, but the issue there was that a series of messages before startup of the REPL. After the messages, everything works. In the case I have there is no REPL, the terminal hangs. I get a REPL in jEdit, but it does not work. Lighttable does not start. - Henk

1 Answers

0
votes

solved. solution was to completely remove and purge leiningen, as described here, then reinstall in ~/bin.