安裝

三条安裝路径——首選静态二進位,次選系统包管理器,末選源码編譯。

1. 静态二進位(一行指令)

最快最便携的安裝路径。用 x eget——x-cmd 对 GitHub release 流水线的封装:

x eget ljh-sh/lhasa    # ~200 KB,零依赖,多架构静态构建

装好的 CLI 名字是 lha(不是 lhasa——项目故意 镜像原版 LHa for UNIX 指令)。安裝后:

$ lha --help | head -1
Lhasa v0.6.0 command line LHA tool  - Copyright (C) 2011-2025 Simon Howard

eget 安裝做了什麼

2. 系统包管理器

如果你直接调 x install lhasa,x-cmd 会解析到系统官方 lhasa 包——源码和 ljh-sh/lhasa 一样。

x install lhasa    # apt / brew / pacman / zypper / xbps-install / pkg / pkgin
發行版安裝指令
Debian / Ubuntu / Kali / Raspbian sudo apt install lhasa
macOS brew install lhasa
Arch yay -S lhasa-git
FreeBSD pkg install archivers/lhasa
NetBSD pkgin install lhasa
openSUSE sudo zypper install lhasa
Void sudo xbps-install lhasa

3. 从源码編譯

源码在 upstream/lhasa/, 通过 git subtreefragglet/lhasa 拉下来。編譯指令:

git clone https://github.com/ljh-sh/lhasa.git
cd lhasa
bash scripts/build.sh
bash scripts/smoke.sh

更新 vendoring:

git subtree pull --prefix=upstream/lhasa https://github.com/fragglet/lhasa.git master --squash