Ubuntu Hardy의 clisp에서 어떻게 사용합니까(:PACKAGE 필요)?
-
01-07-2019 - |
문제
답변을 평가하려고 합니다. 여기서 제공, 오류가 발생합니다. "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)
이 문제를 해결하는 방법에 대한 아이디어가 있습니까?나는 찾았다 이 게시물 인터넷에서 검색했지만 그것도 작동하지 않았습니다.
해결책
clisp에서 clc:clc-require를 사용하세요.'man common-lisp-controller'를 참조하세요.clisp에서 동일한 오류가 발생하여 clc:clc-require를 사용하여 해결했습니다.sbcl은 require만으로 잘 작동합니다.
다른 팁
당신이 받은 지침에는 SBCL이 명시적으로 언급되어 있으므로 SBCL을 사용하면 더 잘 작동할 것으로 예상됩니다.일부 다른 Lisps는 ASDF와 함께 제공되지 않거나 CL:REQUIRE에 연결하지 않습니다.전자의 경우 사전에 ASDF를 직접 로드해야 합니다.후자의 경우 (require ) 대신 (asdf:oos 'asdf:load-op )를 호출해야 합니다.
wget http://cclan.cvs.sourceforge.net/점검/cclan/asdf/asdf.lisp
clbuild를 확인해 볼 가치가 있습니다. http://common-lisp.net/project/clbuild/
Lisp 웹서버를 가동하고 실행하려면.다음만 필요합니다:
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....
다른 것보다 먼저 이것을 시도하십시오:
(require :asdf)
우리가 사용하는 환경에서 몇 가지 아이디어를 훔칠 수 있습니다.다음에서 이용 가능합니다: 다크웹
asdf를 로드하고 설정하는 Environment.lisp를 참조하세요.(sbcl에는 asdf가 이미 로드되어 있습니다)