在Linux上安装Scheme解释器
Sheme 是Lisp方言,详见与Scheme共舞
系统环境:Ubuntu 16.04
使用的软件及版本:racket-7.3
软件官网:https://racket-lang.org/
参考链接:
主要安装步骤:
- 下载
- 安装
- 试用
详细步骤:
- 下载:
~$ wget https://mirror.racket-lang.org/installers/7.3/racket-7.3-x86_64-linux.sh
- 安装:
~$ bash racket-7.3-x86_64-linux.sh
This program will extract and install Racket v7.3.
Note: the required diskspace for this installation is 522M.
Do you want a Unix-style distribution?
In this distribution mode files go into different directories according
to Unix conventions. A "racket-uninstall" script will be generated
to be used when you want to remove the installation. If you say 'no',
the whole Racket directory is kept in a single installation directory
(movable and erasable), possibly with external links into it -- this is
often more convenient, especially if you want to install multiple
versions or keep it in your home directory.
Enter yes/no (default: no) > yes
Where do you want to base your installation of Racket v7.3?
(If you've done such an installation in the past, either
enter the same directory, or run 'racket-uninstall' manually.)
1 - /usr/... [default]
2 - /usr/local/...
3 - ~/... (/root/...)
4 - ./... (here)
Or enter a different directory prefix to install in.
> 2
Target Directories:
[e] Executables /usr/local/bin (exists)
[o] Libraries /usr/local/lib/racket (will be created)
[s] Shared files /usr/local/share/racket (will be created)
[c] Configuration /usr/local/etc/racket (will be created)
[d] Documentation /usr/local/share/racket/doc (will be created)
[a] .desktop files /usr/local/share/applications (exists)
[m] Man Pages /usr/local/share/man (exists)
[l] C Libraries /usr/local/lib (exists)
[h] C headers /usr/local/include/racket (will be created)
Enter a letter to change an entry, or enter to continue.
>
Checking the integrity of the binary archive... ok.
Unpacking into "/usr/local/racket-tmp-install" (Ctrl+C to abort)...
Done.
Moving bin -> /usr/local/bin
Moving collects -> /usr/local/share/racket/collects
Moving doc -> /usr/local/share/racket/doc
Moving lib -> /usr/local/lib/racket
Moving include -> /usr/local/include/racket
Moving share/applications -> /usr/local/share/applications
Moving share -> /usr/local/share/racket
Moving etc -> /usr/local/etc/racket
Moving man -> /usr/local/share/man
Moving README -> /usr/local/share/racket/doc/README
Writing uninstaller at: /usr/local/bin/racket-uninstall...
Rewriting configuration file at: /usr/local/etc/racket/config.rktd...
Installation complete.
- 试用:
~$ racket
Welcome to Racket v7.3.
> (+ 1 2)
3
> (define size 2)
> size
2
> (define (square x) (* x x))
> (square 3)
9
> (exit)
~$ # here is shell