I noticed that there is a package repo for Clojure, so I tried
sudo apt-get install clojure
However, the install failed, it looks like there is a java dependency missing.
I have java installed correctly on my machine: javac -version
results 1.6.0_26.
In any case, I find leiningan is always an easy way to go, but thought I would try apt-get to see if it was working. Any thoughts on this error message?
The following packages have unmet dependencies:
clojure : Depends: libasm3-java but it is not going to be installed
If you have started using Ubuntu or any Ubuntu-based Linux distribution, such as Linux Mint, elementary OS, etc., you must have come across the apt-get command by now. In fact, first in the list of things to do after installing Ubuntu is to use apt-get update and apt-get upgrade.
Most Clojure projects are still built using Leiningen.
APT configuration file method conf file which is found in your /etc/apt/ directory. This method is useful if you only want apt-get (and not other applications) to use a http-proxy permanently.
bat in the current directory, type lein self-install and hit enter to install Leiningen. This shouldn't take more than a minute or two, depending on your network connection. If you're successful, you should be able to type lein repl and hit enter to get to a Clojure REPL (read-eval-print loop) and run Clojure code.
To summarize the comments:
Yes, apt-get works –
... BUT it it is not the preferred way to install Clojure.
So ... whats the "right" way to install Clojure ?
Leiningen remains the up-to-date, conventional way to rapidly get a Clojure installation up and running.
The steps are as follows :
/usr/local/bin
sudo chmod +x /usr/local/bin/lein
.Make sure you have Java installed first, of course.
These steps will install Clojure on any platform with the latest version.
Just a no-brainer script to install leiningen:
cd `mktemp -d`
wget https://raw.github.com/technomancy/leiningen/stable/bin/lein
chmod +x lein
sudo mv lein /usr/local/bin/
lein help
cd -
apt-get install leiningen
works, and easily installs Clojure dependencies (including ones you probably don't need, but it is easy). Debian sid has 1.7.1, which is the most recent stable version; Ubuntu 12.04 has this available in universe. Then you can follow the lein instructions.
Leiningen 2.0 is coming soon; maybe that will become available in a PPA when it is finalized.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With