2

我找到了以下指南:

http://mark.reid.name/sap/setting-up-clojure.html

但它似乎有很多手动步骤,我敢打赌它已经过时了。在 Windows 上安装 ClojureBox 轻而易举。有谁知道它的简单安装程序?我在哪里可以下载它,步骤是什么?

谢谢!

编辑:尝试安装蛋糕,得到:

$ sudo gem install cake
Password:
ERROR:  While executing gem ... (Gem::RemoteSourceException)
    HTTP Response 302

还尝试使用脚本安装:

$ sudo ./cake_install.rb 
http://github.com/ninjudd/cake-standalone/raw/master/jars/cake-0.5.4.jar
[=============================================================================]
http://build.clojure.org/releases/org/clojure/clojure/1.2.0/clojure-1.2.0.jar
[=============================================================================]
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file (ordered_set.clj:1)

编辑2:现在Java版本问题:)我需要什么版本的Java以及在哪里下载它?

$ sudo cake test
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file (ordered_set.clj:1)

我的 Leopard 软件是最新的 :(

Apple Computer supplies their own version of Java. Use the Software Update feature (available on the Apple menu) to check that you have the most up-to-date version of Java for your Mac. If you have problems with downloading, installing or using Java on Mac, please contact Apple Computer Technical Support.

编辑:嗯......我怀疑我尝试过的其中一个建议破坏了我在 Apple 上连接到互联网(有线和无线)的能力:(

4

7 回答 7

6

Clojure 也可以通过 Homebrew 安装:

于 2010-10-24T22:54:06.220 回答
2

刚刚检查过这仍然可以在 Ubuntu 下工作。对于 mac 应该是一样的,除了使用 mac 使用的任何东西而不是 apt-get 来安装 maven:

http://www.learningclojure.com/2010/08/clojure-emacs-swank-slime-maven-maven.html

你需要安装 maven,创建一个文件,然后你可以调用 mvn clojure:repl,一切都应该正常工作。

如果您还想要整个 emacs-swank-slime 设置,现在也很简单,并在此处进行了描述。

如果您尝试一下,您可以在此处或博客上发表评论,让我知道我是否需要对 Mac 进行任何更改?

于 2010-10-24T18:45:36.107 回答
2

如果您只想运行 clojure 程序,那么 macports 可以工作。请记住,您依赖维护者来更新版本。

如果您打算编写clojure 程序,那么cake是一个更好的起点。安装涉及以下之一(您的选择):

使用 gem (最简单)

  1. gem install cake

独立脚本

  1. 下载脚本
  2. 将它放在你的路径中的某个位置并chmod +x cake使其可执行

Git 存储库

  1. git clone git://github.com/ninjudd/cake.git
  2. 将 bin/cake 符号链接到您的路径并使其可执行

Cake 是一个完整的构建系统,但您可以使用它通过运行来启动 repl cake repl。还有leiningen,但启动 repls 会感觉更快,因为它使用持久 JVM。

于 2010-10-24T03:58:38.863 回答
2

我发现Leiningen非常易于使用。只需下载脚本,将其放在 $PATH 中的某个位置(例如 /usr/bin/)并使其可执行:sudo chmod +x lein. 现在输入lein repl,Leiningen 将下载您需要的所有文件并为您创建一个 REPL。就这么容易。

于 2010-10-24T08:49:13.760 回答
2

You may want to check CounterClockWise (an Eclipse plugin). There's a video on how to install it here. It'll give you a lot of features to play with - including a clojure REPL.

于 2010-10-24T14:43:29.863 回答
1

安装MacPorts然后运行sudo port install clojure

于 2010-10-24T03:41:43.120 回答
0

我曾经创建了一个名为 ClojureX 的包,它部分基于 Mark 的文章。它不再被积极维护(至少不是由我维护),但它没有理由不起作用:

http://github.com/citizen428/ClojureX

于 2010-10-26T21:10:47.427 回答