繁体   English   中英

对于Mac OS(Leopard)上的Clojure,有一个简单易用的安装程序吗?

[英]Is there a nice and easy installer for Clojure on Mac OS (Leopard)?

我找到了以下指南:

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上连接到互联网(有线和无线)的能力:(

Clojure也可以通过Homebrew安装:

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

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

使用gem (最简单)

  1. gem install cake

独立脚本

  1. 下载脚本
  2. 把它放在你的路径和chmod +x cake某个地方,使它可执行

Git存储库

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

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

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

您可能想要检查CounterClockWise (Eclipse插件)。 有一个关于如何安装它的视频在这里 它会给你很多功能 - 包括一个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做出任何改变吗?

安装MacPorts ,然后运行sudo port install clojure

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

http://github.com/citizen428/ClojureX

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM