lispcommon-lispsbcluiop

"UIOP" package does not exist in SBCL, can someone help me to find?


I wondered whether you could help with an error I'm getting with SBCL. I'm doing a tutorial, and one of the first lessons is to load a script into LISP. Here's the script, called hello.lisp:

(defun hello ()    
      "say hello to USER"    
      (format t "hello ~a" (uiop:getenv "USER")))    
(hello)

But when I run the command: (load "hello.lisp") I get the following error:

debugger invoked on a SB-C::INPUT-ERROR-IN-LOAD in thread
#<THREAD "main thread" RUNNING {1000510083}>:
  READ error during LOAD:

    Package UIOP does not exist.

      Line: 3, Column: 36, File-Position: 74

      Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/oliver/Programs/hello.lisp" {10015403F3}>

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Abort loading file "/home/oliver/Programs/hello.lisp".
  1:         Exit debugger, returning to top level.

(SB-C:COMPILER-ERROR SB-C::INPUT-ERROR-IN-LOAD :CONDITION #<SB-INT:SIMPLE-READER-PACKAGE-ERROR "Package ~A does not exist." {1001542543}> :STREAM #<SB-INT:FORM-TRACKING-STREAM for "file /home/oliver/Programs/hello.lisp" {10015403F3}>)

Any ideas on how I can fix? It seems I'm missing "UIOP" but I can't figure out how to install. Thanks in advance!

Oliver


Solution

  • SOLUTION Please! add this (require :asdf) command line to .sbclrc file It will work.

    (require :asdf)
    (defun hello ()
      "say hello to USER"
      (format t "hello ~a" (uiop:getenv "USER")))
    (hello)
    

    my hello.lisp file