如何在没有 clojure.jar 的情况下从 Github 存储库在 Ubuntu 10.04 上安装 Clojure [英] How to install Clojure on Ubuntu 10.04 from Github repo with no clojure.jar

查看:20
本文介绍了如何在没有 clojure.jar 的情况下从 Github 存储库在 Ubuntu 10.04 上安装 Clojure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在我的电脑上安装 Clojure 来学习和使用.我正在运行 Ubuntu 10.04,并安装了来自 Synaptic 的最新 Sun Java SDK 和环境.

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.

通过 Google 搜索,我找到了多个指南,它们提供了非常清晰的指南,说明如何使用 SLIME 安装所有依赖项和有用的工具和构建器,例如 ant、maven、leiningen 和 emacs.

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.

有些指南有点过时,尤其是考虑到 Clojure 开发的速度有多快,所以我尽可能地搜索了最新的指南.我从 2010 年 12 月开始关注this指南,它与大多数其他指南非常相似.

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

我看到在我从 github.com/clojure/clojure.git 和 github.com/clojure/clojure-contrib.git 获得的 clojure 源代码中,它们实际上都没有 clojure.jar 来指向 JVM...

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...

我认为可能是我做错了什么,因为我之前在 Google 上的搜索显然没有人遇到过这个问题.我通过浏览器仔细检查了 Github 上的存储库,那里也没有 .jar 文件.

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.

那么……我从哪里得到这个 .jar 文件,或者我应该有其他方法来解决这个问题吗?

So...where do I get this .jar file or is there another way I'm supposed to go about this?

推荐答案

FWIW,如果你没有强烈的编译欲望,如果你只下载 leiningen 或 cake 并得到其中一个,你的生活会更轻松管理所有的 jars 和类路径和东西.例如,这里是让 lein 在 vanilla unix 系统上运行所需的全部内容.(我省略了其中一些命令生成的全屏输出,以强调您只需要输入一些内容).

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

如果您将 lein 放在 PATH 某处(例如 ~/bin)而不是通过完整路径调用它,您的体验会更好,但这根本没有必要.

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.

这篇关于如何在没有 clojure.jar 的情况下从 Github 存储库在 Ubuntu 10.04 上安装 Clojure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆