Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does apt-get work to install Clojure on Linux (ubuntu 10)?

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
like image 509
jayunit100 Avatar asked Oct 21 '11 01:10

jayunit100


People also ask

Does apt-get work on Ubuntu?

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.

Does Leiningen install Clojure?

Most Clojure projects are still built using Leiningen.

Where is apt-get in Ubuntu?

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.

How do I install Clojure on Windows 10?

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.


3 Answers

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 :

  1. copying this shell script: https://raw.github.com/technomancy/leiningen/stable/bin/lein
  2. moving it to /usr/local/bin
  3. calling 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.

like image 75
jayunit100 Avatar answered Oct 20 '22 11:10

jayunit100


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 -
like image 41
Alexey Avatar answered Oct 20 '22 09:10

Alexey


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.

like image 26
Gary Poster Avatar answered Oct 20 '22 10:10

Gary Poster