Lein install fails at "lein version" or "lein repl"


#1

Ran through the setup. Checked to make sure I had the right version of Java, and I do. Getting the following error when I run the “lein version” command or the “lein repl” command:

java.lang.Exception: Error loading /Users/jessierichardson/Desktop/project.clj
at leiningen.core.project$read_raw$fn__6407.invoke (project.clj:962)
leiningen.core.project$read_raw.invokeStatic (project.clj:956)
leiningen.core.project$read_raw.invoke (project.clj:952)
leiningen.core.project$read.invokeStatic (project.clj:973)
leiningen.core.project$read.invoke (project.clj:970)
leiningen.core.project$read.invokeStatic (project.clj:974)
leiningen.core.project$read.invoke (project.clj:970)
leiningen.core.main$_main$fn__5998.invoke (main.clj:397)
leiningen.core.main$_main.invokeStatic (main.clj:394)
leiningen.core.main$_main.doInvoke (main.clj:391)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.lang.Var.invoke (Var.java:379)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.Var.applyTo (Var.java:700)
clojure.core$apply.invokeStatic (core.clj:646)
clojure.main$main_opt.invokeStatic (main.clj:314)
clojure.main$main_opt.invoke (main.clj:310)
clojure.main$main.invokeStatic (main.clj:421)
clojure.main$main.doInvoke (main.clj:384)
clojure.lang.RestFn.invoke (RestFn.java:436)
clojure.lang.Var.invoke (Var.java:388)
clojure.lang.AFn.applyToHelper (AFn.java:160)
clojure.lang.Var.applyTo (Var.java:700)
clojure.main.main (main.java:37)
Caused by: clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: bookmark88 in this context, compiling:(/Users/jessierichardson/Desktop/project.clj:0:0)
at clojure.lang.Compiler.analyze (Compiler.java:6688)
clojure.lang.Compiler.analyze (Compiler.java:6625)
clojure.lang.Compiler.eval (Compiler.java:6931)
clojure.lang.Compiler.load (Compiler.java:7379)
clojure.lang.Compiler.loadFile (Compiler.java:7317)
clojure.lang.RT$3.invoke (RT.java:320)
leiningen.core.project$read_raw$fn__6407.invoke (project.clj:960)
leiningen.core.project$read_raw.invokeStatic (project.clj:956)
leiningen.core.project$read_raw.invoke (project.clj:952)
leiningen.core.project$read.invokeStatic (project.clj:973)
leiningen.core.project$read.invoke (project.clj:970)
leiningen.core.project$read.invokeStatic (project.clj:974)
leiningen.core.project$read.invoke (project.clj:970)
leiningen.core.main$_main$fn__5998.invoke (main.clj:397)
leiningen.core.main$_main.invokeStatic (main.clj:394)
leiningen.core.main$_main.doInvoke (main.clj:391)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.lang.Var.invoke (Var.java:379)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.Var.applyTo (Var.java:700)
clojure.core$apply.invokeStatic (core.clj:646)
clojure.main$main_opt.invokeStatic (main.clj:314)
clojure.main$main_opt.invoke (main.clj:310)
clojure.main$main.invokeStatic (main.clj:421)
clojure.main$main.doInvoke (main.clj:384)
clojure.lang.RestFn.invoke (RestFn.java:436)
clojure.lang.Var.invoke (Var.java:388)
clojure.lang.AFn.applyToHelper (AFn.java:160)
clojure.lang.Var.applyTo (Var.java:700)
clojure.main.main (main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve symbol: bookmark88 in this context
at clojure.lang.Util.runtimeException (Util.java:221)
clojure.lang.Compiler.resolveIn (Compiler.java:7164)
clojure.lang.Compiler.resolve (Compiler.java:7108)
clojure.lang.Compiler.analyzeSymbol (Compiler.java:7069)
clojure.lang.Compiler.analyze (Compiler.java:6648)
clojure.lang.Compiler.analyze (Compiler.java:6625)
clojure.lang.Compiler.eval (Compiler.java:6931)
clojure.lang.Compiler.load (Compiler.java:7379)
clojure.lang.Compiler.loadFile (Compiler.java:7317)
clojure.lang.RT$3.invoke (RT.java:320)
leiningen.core.project$read_raw$fn__6407.invoke (project.clj:960)
leiningen.core.project$read_raw.invokeStatic (project.clj:956)
leiningen.core.project$read_raw.invoke (project.clj:952)
leiningen.core.project$read.invokeStatic (project.clj:973)
leiningen.core.project$read.invoke (project.clj:970)
leiningen.core.project$read.invokeStatic (project.clj:974)
leiningen.core.project$read.invoke (project.clj:970)
leiningen.core.main$_main$fn__5998.invoke (main.clj:397)
leiningen.core.main$_main.invokeStatic (main.clj:394)
leiningen.core.main$_main.doInvoke (main.clj:391)
clojure.lang.RestFn.invoke (RestFn.java:408)
clojure.lang.Var.invoke (Var.java:379)
clojure.lang.AFn.applyToHelper (AFn.java:154)
clojure.lang.Var.applyTo (Var.java:700)
clojure.core$apply.invokeStatic (core.clj:646)
clojure.main$main_opt.invokeStatic (main.clj:314)
clojure.main$main_opt.invoke (main.clj:310)
clojure.main$main.invokeStatic (main.clj:421)
clojure.main$main.doInvoke (main.clj:384)
clojure.lang.RestFn.invoke (RestFn.java:436)
clojure.lang.Var.invoke (Var.java:388)
clojure.lang.AFn.applyToHelper (AFn.java:160)
clojure.lang.Var.applyTo (Var.java:700)
clojure.main.main (main.java:37

Any idea what’s going on?


#3

Can anyone help with this please? This is killin’ me.


#4

Hi @jesskrich,

Sorry! I thought you had solved it.

It looks like leiningen is trying to read the file on your Desktop called project.clj, and it’s having some trouble reading it. However, when you’re doing lein version, you probably don’t need a project.clj. Can you run lein version in a different directory?

Otherwise, please post the contents of project.clj here so I can take a look at it.

Rock on!
Eric


#5

Thanks a bunch Eric! lein version works in my old clojure project directories and so does the repl, but not in this one.


#6

Cool! It must be that project.clj file. Is there an obvious typo? Something about bookmark88?


#7

Hi, I have a similar problem.

This is the error message:

Alexanders-Air:~ Alexander_Baloche$ lein version
Error reading profiles.clj from /Users/Alexander_Baloche/.lein
java.io.FileNotFoundException: /Users/Alexander_Baloche/.lein/profiles.clj (Is a directory)
 at java.io.FileInputStream.open0 (FileInputStream.java:-2)
    java.io.FileInputStream.open (FileInputStream.java:195)
    java.io.FileInputStream.<init> (FileInputStream.java:138)
    clojure.java.io$fn__9520.invokeStatic (io.clj:229)
    clojure.java.io/fn (io.clj:229)
    clojure.java.io$fn__9433$G__9426__9440.invoke (io.clj:69)
    clojure.java.io$fn__9494.invokeStatic (io.clj:165)
    clojure.java.io/fn (io.clj:165)
    clojure.java.io$fn__9446$G__9422__9453.invoke (io.clj:69)
    clojure.java.io$reader.invokeStatic (io.clj:102)
    clojure.java.io$reader.doInvoke (io.clj:86)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.core$apply.invokeStatic (core.clj:648)
    clojure.core$slurp.invokeStatic (core.clj:6657)
    clojure.core$slurp.doInvoke (core.clj:6657)
    clojure.lang.RestFn.invoke (RestFn.java:410)
    leiningen.core.utils$read_file.invokeStatic (utils.clj:43)
    leiningen.core.utils$read_file.invoke (utils.clj:39)
    leiningen.core.user$fn__6513.invokeStatic (user.clj:69)
    leiningen.core.user/fn (user.clj:68)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:646)
    clojure.core$memoize$fn__5708.doInvoke (core.clj:6107)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    leiningen.core.user$fn__6516.invokeStatic (user.clj:87)
    leiningen.core.user/fn (user.clj:77)
    clojure.lang.AFn.applyToHelper (AFn.java:152)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:646)
    clojure.core$memoize$fn__5708.doInvoke (core.clj:6107)
    clojure.lang.RestFn.invoke (RestFn.java:397)
    leiningen.core.user$profile_auth.invokeStatic (user.clj:193)
    leiningen.core.user$profile_auth.invoke (user.clj:190)
    leiningen.core.classpath$add_repo_auth.invokeStatic (classpath.clj:210)
    leiningen.core.classpath$add_repo_auth.invoke (classpath.clj:194)
    clojure.core$map$fn__4785.invoke (core.clj:2644)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
    clojure.lang.LazySeq.seq (LazySeq.java:49)
    clojure.lang.RT.seq (RT.java:521)
    clojure.core$seq__4357.invokeStatic (core.clj:137)
    clojure.core$map$fn__4785.invoke (core.clj:2637)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
    clojure.lang.LazySeq.seq (LazySeq.java:49)
    clojure.lang.RT.seq (RT.java:521)
    clojure.core$seq__4357.invokeStatic (core.clj:137)
    clojure.core$map$fn__4785.invoke (core.clj:2637)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
    clojure.lang.LazySeq.seq (LazySeq.java:49)
    clojure.lang.RT.seq (RT.java:521)
    clojure.lang.LazilyPersistentVector.create (LazilyPersistentVector.java:44)
    clojure.core$vec.invokeStatic (core.clj:377)
    clojure.core$vec.invoke (core.clj:367)
    cemerick.pomegranate.aether$resolve_dependencies_STAR_.invokeStatic (aether.clj:768)
    cemerick.pomegranate.aether$resolve_dependencies_STAR_.doInvoke (aether.clj:677)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:646)
    clojure.core$apply.invoke (core.clj:641)
    cemerick.pomegranate.aether$resolve_dependencies.invokeStatic (aether.clj:785)
    cemerick.pomegranate.aether$resolve_dependencies.doInvoke (aether.clj:779)
    clojure.lang.RestFn.invoke (RestFn.java:2793)
    leiningen.core.classpath$fn__6722.invokeStatic (classpath.clj:260)
    leiningen.core.classpath/fn (classpath.clj:253)
    clojure.lang.AFn.applyToHelper (AFn.java:165)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:646)
    clojure.core$memoize$fn__5708.doInvoke (core.clj:6107)
    clojure.lang.RestFn.invoke (RestFn.java:457)
    leiningen.core.classpath$get_dependencies.invokeStatic (classpath.clj:421)
    leiningen.core.classpath$get_dependencies.doInvoke (classpath.clj:413)
    clojure.lang.RestFn.invoke (RestFn.java:445)
    clojure.lang.AFn.applyToHelper (AFn.java:160)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.core$apply.invokeStatic (core.clj:652)
    clojure.core$apply.invoke (core.clj:641)
    leiningen.core.classpath$resolve_managed_dependencies.invokeStatic (classpath.clj:509)
    leiningen.core.classpath$resolve_managed_dependencies.doInvoke (classpath.clj:496)
    clojure.lang.RestFn.invoke (RestFn.java:445)
    leiningen.core.classpath$get_classpath.invokeStatic (classpath.clj:644)
    leiningen.core.classpath$get_classpath.invoke (classpath.clj:636)
    leiningen.core.project$init_lein_classpath.invokeStatic (project.clj:889)
    leiningen.core.project$init_lein_classpath.invoke (project.clj:884)
    leiningen.core.project$init_project.invokeStatic (project.clj:896)
    leiningen.core.project$init_project.invoke (project.clj:892)
    leiningen.core.project$init_project.invokeStatic (project.clj:903)
    leiningen.core.project$init_project.invoke (project.clj:892)
    leiningen.core.main$default_project.invokeStatic (main.clj:389)
    leiningen.core.main$default_project.invoke (main.clj:382)
    leiningen.core.main$_main$fn__5998.invoke (main.clj:398)
    leiningen.core.main$_main.invokeStatic (main.clj:394)
    leiningen.core.main$_main.doInvoke (main.clj:391)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    clojure.lang.Var.invoke (Var.java:379)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invokeStatic (core.clj:646)
    clojure.main$main_opt.invokeStatic (main.clj:314)
    clojure.main$main_opt.invoke (main.clj:310)
    clojure.main$main.invokeStatic (main.clj:421)
    clojure.main$main.doInvoke (main.clj:384)
    clojure.lang.RestFn.invoke (RestFn.java:436)
    clojure.lang.Var.invoke (Var.java:388)
    clojure.lang.AFn.applyToHelper (AFn.java:160)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.main.main (main.java:37)

But i cant tell from the thread how it was fixed…


#8

Hi @Al_x,

It looks like Leiningen is trying to open a file at /Users/Alexander_Baloche/.lein/profiles.clj. But it also looks like that path exists but it’s a directory. Can you run this command, please:

ls -l /Users/Alexander_Baloche/.lein/profiles.clj

If it’s a directory, what’s in it? It should be a text file or not exist.

Thanks
Eric


#9

cool, after a short reinstall it worked!