I've been trying to install Clojure on my computer to learn and use. I'm running Ubuntu 10.04, and have installed the latest Sun Java SDK and environment from Synaptic.
Searching with Google, I found multiple guides that give pretty clear guides on how to go about installing all the dependencies and useful tools and builders like ant, maven, leiningen, and emacs with SLIME.
Some of the guides are a bit dated, especially considering how fast Clojure development moves, so I searched for the most up-to-date one I could. I've been following this guide from December of 2010 and it's very similar to most others.
The one big problem I come up against is at the step where I have to fire up the REPL with
java -开发者_如何学运维cp clojure.jar clojure.main
I see that in the clojure source I've gotten from github.com/clojure/clojure.git and the github.com/clojure/clojure-contrib.git that neither actually have a clojure.jar to point the JVM to...
I think that maybe there's something I'm doing wrong, since no one has had this problem before apparently from my searches on Google. I double checked the repos on Github via a browser and there is no .jar file there either.
So...where do I get this .jar file or is there another way I'm supposed to go about this?
FWIW, if you don't have an intense desire to compile stuff, your life will be easier if you just download leiningen or cake, and get one of them to manage all the jars and classpaths and stuff. For example, here's all it takes to get lein running on a vanilla unix system. (I've omitted the screensful of output some of these commands generate to emphasize that you only have to type a few things).
akm@li231-96: ~
$ curl https://raw.github.com/technomancy/leiningen/stable/bin/lein > lein
akm@li231-96: ~
$ chmod +x lein
akm@li231-96: ~
$ ./lein self-install
akm@li231-96: ~
$ ./lein repl
Using JLine for console I/O; install rlwrap for optimum experience.
REPL started; server listening on localhost:60099.
user=> (inc 1)
2
Your experience will be better if you put lein on your PATH somewhere (eg ~/bin
) rather than calling it by full path, but it's not at all necessary.
精彩评论