简体   繁体   English

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

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

I found the following guide: 我找到了以下指南:

http://mark.reid.name/sap/setting-up-clojure.html 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. 在Windows上安装ClojureBox是一件轻而易举的事。 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? 编辑2 :现在Java版本问题:)我需要什么版本的Java以及在哪里下载它?

$ 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 :( 我的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.

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 :( 编辑:嗯...我怀疑我尝试的其中一个建议打破了我在Apple上连接到互联网(有线和无线)的能力:(

Clojure is also installable via Homebrew: Clojure也可以通过Homebrew安装:

If you just want to run clojure programs, then macports works. 如果你只想运行clojure程序,那么macports就可以了。 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. 如果你计划编写 clojure程序,那么蛋糕是一个更好的起点。 Installation involves one of the following (your choice): 安装涉及以下之一(您的选择):

Using gem (easiest) 使用gem (最简单)

  1. gem install cake

Standalone script 独立脚本

  1. Download the script 下载脚本
  2. Put it somewhere in your path and chmod +x cake to make it executable 把它放在你的路径和chmod +x cake某个地方,使它可执行

Git repository Git存储库

  1. git clone git://github.com/ninjudd/cake.git
  2. Symlink bin/cake into your path and make it executable 符号链接bin / cake进入你的路径并使其可执行

Cake is a full build system, but you can just use it to fire up the repl by running cake repl . Cake是一个完整的构建系统,但您可以通过运行cake repl来使用它来启动cake repl There's also leiningen , but starting repls will feel faster in cake since it uses persistent JVMs. 还有leiningen ,但由于它使用持久性JVM,因此启动repls会感觉更快。

I find Leiningen very easy to use. 我发现Leiningen非常容易使用。 Just download the script, put it somewhere in your $PATH (/usr/bin/ for example) and make it executable: sudo chmod +x lein . 只需下载脚本,将其放在$ PATH(例如/ usr / bin /)中,并使其可执行: sudo chmod +x lein Now type lein repl and Leiningen will download all the files you need and create a REPL for you. 现在键入lein repl ,Leiningen将下载您需要的所有文件并为您创建REPL。 It's that easy. 就这么简单。

You may want to check CounterClockWise (an Eclipse plugin). 您可能想要检查CounterClockWise (Eclipse插件)。 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. 它会给你很多功能 - 包括一个clojure REPL。

Just checked this will still work under Ubuntu. 刚刚检查过这仍然可以在Ubuntu下运行。 It should be the same for macs, except using whatever macs use instead of apt-get to install maven: 对于mac应该是相同的,除了使用任何mac而不是apt-get来安装maven:

http://www.learningclojure.com/2010/08/clojure-emacs-swank-slime-maven-maven.html 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. 你需要安装maven,创建一个文件,然后你可以调用mvn clojure:repl,一切都应该正常工作。

If you'd also like the whole emacs-swank-slime setup that's also easy now, and described there. 如果你也喜欢整个emacs-swank-slime设置,现在也很容易,并在那里描述。

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? 如果您尝试它,您可以在这里或在博客上发表评论,让我知道我需要为mac做出任何改变吗?

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

I once created a package called ClojureX that was partly based on Mark's article. 我曾经创建了一个名为ClojureX的软件包,部分基于Mark的文章。 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 http://github.com/citizen428/ClojureX

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

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