Common-lisp integrated environmental structures

Reason: common-lisp learning process, usually at my local virtual machine, with lispbox (due to the very old reference books). Recently there is a demand to run on my remote server (ubuntu, virtual host in the United States, because we all know). After installation lispbox, I found it impossible to open on a remote ssh tools, change tools to test, or not. Lispbox project should be abandoned, no maintenance reasons. And was 23 version of emacs

Manual installation environment common-lisp (linux-64 + emacs-24.5 + slime + sbcl-1.3.1 + quicklisp)

1. Install good emacs

  Since I was in ubuntu, the direct apt-get install emacs

  If install emacs in centos, redhat in yum. emacs version may be different, but 23 have no problem

2. Install slime

  Since the upload speed is too slow, and my host ubuntu in the United States, so I'm down with clone git, you can also download it by other means such as wget.

  Note a: path slime problems

    First switch to the user root path: cd ~ cd .emacs.d find the site-lisp directory (in fact, does not have to name), if not create one. Then enter the site-lisp slime placed here as: git clone https://github.com/slime/slime.git

 

3. Installation SbCl (here can change various common-lisp dialect)

  According to the official recommendation installed in / usr / local / directory (note the machine and to download the version matching -86_64 as 32-8664) after decompression 

wget http://prdownloads.sourceforge.net/sbcl/sbcl-1.3.1-x86-64-linux-binary.tar.bz2 

bzip2 -cd sbcl-1.3.1-x86-linux-binary.tar.bz2 | tar xvf -
安装:
cd sbcl-1.3.1-x86-linux
sh install.sh

安装好后,会提示sbcl的路径 :我的是在:/usr/local/bin  记录下这个路径,如果忘了 which sbcl
查看。在shell 中运行sbcl 会出现sbcl的版本信息,表示安装成功,(quit)退出

4.配置emacs
  返回~根目录 cd ~  找到一个叫.emacs的文件(有的人没有),没有的话创建一个,emacs .emacs
  将下面的内容复制上去
;; setup load-path and autoloads
           (add-to-list 'load-path "~/.emacs.d/site-lisp/slime")
           (require 'slime-autoloads)
 
      ;; Set your lisp system and, optionally, some contribs
         (setq inferior-lisp-program "/usr/local/bin/sbcl") 
(setq slime-contribs '(slime-fancy))
 
ctrl + x ctrl + s save the modified contents
ctrl + x ctrl + c to exit emacs editor. You will all of this
Description: In fact, observe the contents .emacs file, you will know what it means, you can modify your own slime installation path, and the path sbcl
 
Run emacs Mx slime you can see the CL-USER>
 

Configuration complete!

5. Installation quicklisp Package Manager (refer to self ladder https://www.quicklisp.org/beta/)----

    Run under the shell:

curl -O https://beta.quicklisp.org/quicklisp.lisp
    Verify the integrity of quicklisp.lisp:

curl -O https://beta.quicklisp.org/quicklisp.lisp.asc
gpg --verify quicklisp.lisp.asc quicklisp.lisp
        good singnatrue ---- represents validation

Enter emacs Mx slime into the CL-USER>

, Cd to select the working directory. The best is to just download files quicklisp.lisp copied to the working directory.

(Load "quicklisp.lisp") // If you do not find this file prompts an error (in this case, in the REPL sbcl's)


(quicklisp-quickstart:install)
The installation is complete

Quicklisp automatically loaded when you start common-lisp


(ql:add-to-init-file)


// quicklisp of use

To load software, use:

(ql:quickload system-name)

To remove software, use:

(ql:uninstall system-name)

To find out what's available in Quicklisp, use:

(ql:system-apropos substring)

To load Quicklisp when you start Lisp, use:

(ql:add-to-init-file)

To get updated software, use:

(ql:update-all-dists)

To update the Quicklisp client, use:

(ql:update-client)

To see what systems depend on a particular system, use:

(ql:who-depends-on system-name)
(Finish)


    

 

 

 

 


Reproduced in: https: //my.oschina.net/livend/blog/611792

Guess you like

Origin blog.csdn.net/weixin_34368949/article/details/91822559