簡體   English   中英

如何在Ubuntu Hardy下的clisp中使用(require:PACKAGE)?

[英]How do I use (require :PACKAGE) in clisp under Ubuntu Hardy?

我正在嘗試評估此處提供的答案,並在使用clisp時收到錯誤: "A file with name ASDF-INSTALL does not exist"

dsm@localhost:~$ clisp -q
[1]> (require :asdf-install)

*** - LOAD: A file with name ASDF-INSTALL does not exist
The following restarts are available:
ABORT          :R1      ABORT
Break 1 [2]> :r1
[3]> (quit)

dsm@localhost:~$ 

cmucl拋出類似的錯誤:

dsm@localhost:~$ cmucl -q
Warning:  #<Command Line Switch "q"> is an illegal switch
CMU Common Lisp CVS release-19a 19a-release-20040728 + minimal debian patches, running on crap-pile
With core: /usr/lib/cmucl/lisp.core
Dumped on: Sat, 2008-09-20 20:11:54+02:00 on localhost
For support see http://www.cons.org/cmucl/support.html Send bug reports to the debian BTS.
or to pvaneynd@debian.org
type (help) for help, (quit) to exit, and (demo) to see the demos

Loaded subsystems:
    Python 1.1, target Intel x86
    CLOS based on Gerd's PCL 2004/04/14 03:32:47
* (require :asdf-install)


Error in function REQUIRE:  Don't know how to load ASDF-INSTALL
   [Condition of type SIMPLE-ERROR]

Restarts:
  0: [ABORT] Return to Top-Level.

Debug  (type H for help)

(REQUIRE :ASDF-INSTALL NIL)
Source: 
; File: target:code/module.lisp
(ERROR "Don't know how to load ~A" MODULE-NAME)
0] (quit)
dsm@localhost:~$ 

但sbcl完美運行:

dsm@localhost:~$ sbcl -q
This is SBCL 1.0.11.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* (require :asdf-install)

; loading system definition from
; /usr/lib/sbcl/sb-bsd-sockets/sb-bsd-sockets.asd into #<PACKAGE "ASDF0">
; registering #<SYSTEM SB-BSD-SOCKETS {AB01A89}> as SB-BSD-SOCKETS
; registering #<SYSTEM SB-BSD-SOCKETS-TESTS {AC67181}> as SB-BSD-SOCKETS-TESTS
("SB-BSD-SOCKETS" "ASDF-INSTALL")
* (quit)

有想法該怎么解決這個嗎? 我在互聯網上發現了這篇文章 ,但使用它也無效。

在此之前嘗試這個:

(require :asdf)

你可以從我們使用的環境中竊取一些想法。 它可以在: darcsweb

請參閱為我們加載和設置asdf的environment.lisp。 (sbcl已經加載了asdf)

你提到的說明明確提到了SBCL,所以我認為使用SBCL可以更好地工作。 其他一些Lisps沒有附帶ASDF或者沒有將它連接到CL:REQUIRE。 在前一種情況下,您將事先自己加載ASDF。 在后一種情況下,您需要調用(asdf:oos'asdf:load-op)而不是(require)。

wget http://cclan.cvs.sourceforge.net/ checkout /cclan/asdf/asdf.lisp

值得一試clbuild。 http://common-lisp.net/project/clbuild/

啟動並運行lisp Web服務器。 你只需要:

darcs get http://common-lisp.net/project/clbuild/clbuild
cd clbuild
chmod +x ./clbuild
./clbuild check
./clbuild build slime hunchentoot
./clbuild preloaded

現在一個lisp repl將啟動。 你在那里寫道:

* (hunchentoot:start-server :port 8080)

測試服務器的答案:

wget -O - http://localhost:8080/

<html><head><title>Hunchentoot</title></head>
 <body><h2>Hunchentoot Default Page</h2>
  <p>This is the Hunchentoot default page....

在clisp中使用clc:clc-require。 請參閱'man common-lisp-controller'。 我在clisp中遇到了同樣的錯誤,並使用clc:clc-require解決了它。 sbcl工作正常,只需要。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM