You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何将Lisp管理工具ASDF从3.1.7升级至3.3.1并消除版本警告?

Fixing ASDF Version Mismatch in SBCL/Emacs/Slime Setup

Hey there, let's work through this ASDF version warning you're seeing. First, let's break down why this is happening, then walk through steps to get everything aligned on ASDF 3.3.1.

Why the Mismatch?

ASDF (Another System Definition Facility) gets distributed in a few places:

  • SBCL itself comes with a bundled ASDF version
  • Quicklisp includes its own updated copy of ASDF
  • Ubuntu's system packages (like the sbcl package from Canonical) often ship with older, stable ASDF versions (in your case, 3.1.7)

When you restarted your environment after reinstalling, SBCL likely loaded the old system-provided ASDF first, then later loaded the newer 3.3.1 version from either SBCL's built-in copy or Quicklisp. That's why you're seeing the warning about a mismatch between the registered system version and the currently active one.

Step 1: Identify Where Your ASDF Versions Are Coming From

First, fire up SBCL (either directly or via Slime) and run these commands to pinpoint the sources:

  • Check the current active ASDF version:
    (asdf:asdf-version)
    
  • Find where the system-registered ASDF is located:
    (asdf:where-is-system :asdf)
    
  • Check if Quicklisp has an ASDF copy:
    (ql:where-is-system :asdf)
    

This will tell you whether the newer 3.3.1 is coming from SBCL itself or Quicklisp, and where the old 3.1.7 is stored (probably in /usr/share/common-lisp/source/asdf/ from the Ubuntu package).

Step 2: Force SBCL to Load the Newer ASDF First

The most reliable fix is to make sure the newer ASDF loads before the system's old version. Here's how:

  1. Open your SBCL startup file ~/.sbclrc in Emacs or your favorite editor.

  2. Add these lines to prioritize the newer ASDF (adjust the path if your Quicklisp/SBCL ASDF location is different):

    ;; Load Quicklisp first (if you haven't already)
    (load "~/quicklisp/setup.lisp")
    
    ;; Point ASDF to the newer version directory
    (let ((new-asdf-dir (merge-pathnames "quicklisp/dists/quicklisp/software/asdf-3.3.1/" (user-homedir-pathname))))
      (push new-asdf-dir asdf:*central-registry*))
    

    If the newer ASDF is from SBCL's built-in copy instead of Quicklisp, replace the path with the directory where SBCL stores its ASDF files (you can find this via (asdf:where-is-system :asdf) when running the newer version).

  3. Save the file and restart SBCL/Slime.

Step 3: Verify the Fix

After restarting, run (asdf:asdf-version) again—it should show 3.3.1, and the warning about version mismatch should be gone. You can also double-check the registered system version with:

(loop for sys in (asdf:registered-systems)
      when (string-equal (asdf:component-name sys) "asdf")
      do (print (asdf:component-version sys)))

Upgrading ASDF to 3.3.1 (If Needed)

If for some reason Quicklisp/SBCL doesn't have 3.3.1, you can manually upgrade:

  1. Download the latest ASDF source (version 3.3.1) from the official ASDF repo.
  2. Extract it to a directory like ~/.local/common-lisp/asdf-3.3.1/.
  3. Add this line to ~/.sbclrc before any other ASDF/Quicklisp loads:
    (load "~/.local/common-lisp/asdf-3.3.1/asdf.lisp")
    

This will force SBCL to load your manually installed updated ASDF instead of the system's old version.


内容的提问来源于stack exchange,提问作者TheGeeko61

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 03:21:44