Mac OS (Leopard) 上有一个漂亮且简单的 Clojure 安装程序吗?
我找到了以下指南:
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 上连接到互联网(有线和无线)的能力: (
I found the following guide:
http://mark.reid.name/sap/setting-up-clojure.html
but it seems like a whole lot of manual steps, and I bet it is out of date already. Installing ClojureBox on Windows was a breeze. Does anyone know of a simple installer for it? Where can I download it, and what are the steps?
Thanks!
EDIT: Tried installing cake, got:
$ sudo gem install cake
Password:
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302
Also tried installing using the script:
$ 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)
EDIT 2: Now the Java version issues :) What version of Java do I need and where to download it?
$ sudo cake test
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file (ordered_set.clj:1)
My Leopard software is up to date :(
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.
EDIT: Hm ... I suspect that one of the suggestions I tried broke my ability to connect to the internet (both wired as well as wireless) on Apple :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
Clojure 也可以通过 Homebrew 安装:
Clojure is also installable via Homebrew:
如果您只想运行 clojure 程序,那么 macports 就可以了。请记住,您依赖维护者来更新版本。
如果您计划编写 clojure 程序,那么 cake 是一个更好的起点观点。安装涉及以下其中一项(您的选择):
使用 gem(最简单)
gem install cake
独立脚本
chmod +x cake
进行制作它可执行Git 存储库
git clone git://github.com/ninjudd/cake.git
Cake 是一个完整的构建系统,但您可以通过运行 Cake repl 使用它来启动 repl。还有leiningen,但是启动 repl 会感觉更快,因为它使用持久性 JVM。
If you just want to run clojure programs, then macports works. Bear in mind you're dependent upon the maintainer to update versions.
If you plan on writing clojure programs, then cake is a better starting point. Installation involves one of the following (your choice):
Using gem (easiest)
gem install cake
Standalone script
chmod +x cake
to make it executableGit repository
git clone git://github.com/ninjudd/cake.git
Cake is a full build system, but you can just use it to fire up the repl by running
cake repl
. There's also leiningen, but starting repls will feel faster in cake since it uses persistent JVMs.我发现 Leiningen 非常容易使用。只需下载脚本,将其放在 $PATH 中的某个位置(例如 /usr/bin/)并使其可执行:
sudo chmod +x lein
。现在输入 lein repl ,Leiningen 将下载您需要的所有文件并为您创建一个 REPL。就是这么简单。
I find Leiningen very easy to use. Just download the script, put it somewhere in your $PATH (/usr/bin/ for example) and make it executable:
sudo chmod +x lein
.Now type
lein repl
and Leiningen will download all the files you need and create a REPL for you. It's that easy.您可能需要检查CounterClockWise(一个 Eclipse 插件)。 此处有一个有关如何安装它的视频。它将为您提供许多可供使用的功能 - 包括 clojure REPL。
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.
刚刚检查过这在 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 进行任何更改吗?
Just checked this will still work under Ubuntu. It should be the same for macs, except using whatever macs use instead of apt-get to install maven:
http://www.learningclojure.com/2010/08/clojure-emacs-swank-slime-maven-maven.html
You need to install maven, create a file, then you can just call mvn clojure:repl and everything should just work.
If you'd also like the whole emacs-swank-slime setup that's also easy now, and described there.
If you try it can you comment back here or on the blog to let me know if there are any changes I need to make for macs?
安装 MacPorts,然后运行
sudo port install clojure
Install MacPorts and then run
sudo port install clojure
我曾经创建了一个名为 ClojureX 的包,它部分基于 Mark 的文章。它不再被积极维护(至少不是由我维护),但没有理由它不起作用:
http:// github.com/citizen428/ClojureX
I once created a package called ClojureX that was partly based on Mark's article. It's not actively maintained anymore (at least not by me), but there's no reason it wouldn't work:
http://github.com/citizen428/ClojureX