安装

三条安装路径——首选静态二进制,次选系统包管理器,末选源码编译。

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