尝试在 MacOSX Snow Leopard 上安装 MIT-Scheme 时遇到问题

发布于 2024-11-01 16:27:08 字数 69 浏览 7 评论 0原文

我正在尝试安装 MIT-Scheme,以便我可以在终端上使用它,而不是使用 IDE,但是,我很难找到实际上最新且有效的教程。

I am trying to install MIT-Scheme so that i can use it off my terminal instead of using an IDE, however, I am having difficulty trying to find tutorials that are actually up to date and works.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梦中楼上月下 2024-11-08 16:27:08

你可以通过Macports安装MIT计划,这可能需要很长时间(我认为它是从源代码编译的)。您还可以从此处获取预编译的二进制文件,它将安装 MIT-Scheme.app它启动 Edwin 一个 Emacs 端口或包含一个方案调试器和 REPL 的东西。但您也可以从命令行启动它。

检查它的安装位置,在我的计算机上,它位于 /Applications/mit-scheme.app/Contents/Resources/ 但可能会有所不同。通过编辑 ~/.bash_profile 并添加以下内容,将此目录添加到您的 PATH 中:

export PATH=$PATH":/Applications/mit-scheme.app/Contents/Resources/"

检查 which mit-scheme 以确保其安装正确。

至于 Racket,还可以从此处获取预编译的二进制文件。 (它可能在 Macports 中,但也可能不是,或者在 Fink 中,我不知道。我尽量避免这些,并尽可能使用 Homebrew。)这是一个 dmg 文件,您可以提取该文件并放在你想要的任何地方。我把我的放在 ~/bin 中,并将 ~/bin/racket/bin/ 添加到我的 PATH 中,过程与上面相同,但是你可以把它放在任何地方,/Applications/ 或其他地方。

祝你好运。

You can install MIT Scheme through Macports, and it will probably take a long time (it's compiling it from source, I think). You can also get a precompiled binary from here which will install an MIT-Scheme.app which starts Edwin an Emacs port or something which includes a Scheme debugger and REPL. But you can also start it from the command line.

Check to see where it installed to, on my machine it's here /Applications/mit-scheme.app/Contents/Resources/ but that might vary. Add this directory to your PATH by editing ~/.bash_profile and adding this:

export PATH=$PATH":/Applications/mit-scheme.app/Contents/Resources/"

Check with which mit-scheme to make sure it installed correctly.

As for Racket, there's also a precompiled binary available from here. (It might be in Macports but it might not be, or in Fink, I don't know. I try to avoid those and use Homebrew if possible.) This is a dmg file which you can extract and put wherever you want. I put mine in ~/bin and added ~/bin/racket/bin/ to my PATH as well, same process as above, but you can put it anywhere, /Applications/ or whatever.

Good luck.

予囚 2024-11-08 16:27:08

这似乎是一个奇怪的答案,因为它是关于 Racket 的一个问题,而这个问题最初是关于 MIT Scheme 的,但既然你也尝试过 Racket...

要从终端运行 Racket,你需要使用 racket 可执行文件,可在 bin 子目录中找到。例如,如果您将其安装在 /Applications/Racket-5.1 处,那么您将运行 /Applications/Racket-5.1/bin/racket。 (您可以修改您的 $PATH 或添加一些符号链接,以便可以在不指定完整路径的情况下运行。)

This seems like a odd answer since it's about Racket for a question that was originally about MIT Scheme, but since you tried Racket too...

To run Racket from the terminal, you need to use the racket executable, which is found in the bin subdirectory. For example, if you install it at /Applications/Racket-5.1, then you'd run /Applications/Racket-5.1/bin/racket. (And you could modify your $PATH or add some symlink to make it possible to run without specifying the full path.)

浪菊怪哟 2024-11-08 16:27:08

您可以在此处找到详细答案。

这是一个简短的版本:

  1. 下载 MIT-Scheme 的 .dmg 文件。根据您的硬件架构选择 32 位或 64 位。

  2. 安装后运行以下命令

对于 32 位程序包:

sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-i386

sudo ln -s /usr/local/lib/mit-scheme-i386/mit-scheme /usr/bin/scheme

对于 64 位程序包:

sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-x86-64

sudo ln -s /usr/local/lib/mit-scheme-x86-64/mit-scheme /usr/bin/scheme
  1. 要从终端运行 MIT-Scheme,只需在命令提示符中键入“scheme”。

You can find the detailed answer here.

Here is a short version:

  1. Download .dmg file of MIT-Scheme. 32-bit or 64-bit based on your hardware architecture.

  2. After installation run the following commands

For 32-bit package:

sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-i386

sudo ln -s /usr/local/lib/mit-scheme-i386/mit-scheme /usr/bin/scheme

For 64-bit package:

sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-x86-64

sudo ln -s /usr/local/lib/mit-scheme-x86-64/mit-scheme /usr/bin/scheme
  1. To run MIT-Scheme from your terminal just type 'scheme' in the command prompt.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文