# 使用 Homebrew, pacman, zypper, scoop, apk, apt, dnf, MacPorts, Nix, chocolatey, winget 安装 lua@5.4

查看 lua@5.4 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:lua@5.4
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install lua@5.4
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install lua
```

  证据: MacPorts ports tree: lang/lua/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- pacman (92%):

```sh
sudo pacman -S lua54
```

  证据: Arch Linux sync databases: lua54 from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install lua54
```

  证据: openSUSE Tumbleweed package metadata: lua54 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

- apk (92%):

```sh
sudo apk add lua5.4
```

  证据: Alpine Linux edge package indexes: lua5.4 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install liblua5.4-0
```

  证据: Debian stable package indexes: liblua5.4-0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install lua
```

  证据: Fedora Rawhide package metadata: lua from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#lua
```

  证据: nixpkgs package indexes: lua from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

### Windows

- Scoop (92%):

```sh
scoop install versions/lua54
```

  证据: Scoop official bucket manifest trees: bucket/lua54.json from https://api.github.com/repos/ScoopInstaller/Versions/git/trees/master?recursive=1

- Chocolatey (92%):

```sh
choco install Lua
```

  证据: Chocolatey community package catalog: Lua from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','logexpert'

- winget (92%):

```sh
winget install --id DEVCOM.Lua -e
```

  证据: Windows Package Manager source index: DEVCOM.Lua from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:lua@5.4
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/lua@5.4>
- **版本:** 5.4.8
- **来源摘要:** Powerful, lightweight programming language
- **主页:** <https://www.lua.org/>
- **上游文档:** <https://www.lua.org/>
- **许可证:** MIT
- **源码归档:** <https://www.lua.org/ftp/lua-5.4.8.tar.gz>
- **最后更新:** 2026-06-19T12:31:49-07:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 安装行为

- post-install 钩子: 未定义
- 注意事项: You may also want luarocks: brew install luarocks
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 5.4.8
- 管理器更新时间: 2026-06-19
- 本地数据: OK
- 上游仓库: https://www.lua.org/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

Lua 5.4 is the Homebrew versioned package for the Lua 5.4 runtime line. It exists because Lua minor versions can differ in API, ABI, virtual machine, and language behavior, so package managers keep older supported series available beside the current lua formula.

### 项目历史

Lua 5.4 belongs to the long-running Lua 5.x family from PUC-Rio and Lua.org. The official version history says Lua 5.4 was released on 29 Jun 2020, with a new generational garbage collection mode plus const and to-be-closed variables as its main new features.

The official Lua 5.4 manual describes Lua as a lightweight embeddable language implemented as a clean C library plus the standalone lua host program. In the 5.4 line, those long-standing Lua traits continued while the runtime refined memory-management and resource-finalization behavior.

The versioned 5.4 package is distinct from the unversioned lua package because applications embedding Lua, C modules, and precompiled Lua chunks may be tied to a specific minor version. The official version history explicitly warns that different Lua versions are really different: APIs may change, there is no ABI compatibility, and virtual machines are likely to differ.

### 采用历史

Lua 5.4 became the stable post-5.3 runtime line for projects that wanted standard Lua while avoiding a jump to later language changes. The supplied package-manager facts show dedicated Lua 5.4 packaging across apk, Homebrew, Debian, Ubuntu, pacman, and other ecosystems, reflecting the common distribution habit of keeping several Lua runtimes installable at once.

For downstream packages, Lua 5.4 support also mattered because developer tools such as Luacheck and LuaLS had to understand 5.4 syntax and standard-library definitions. Luacheck's changelog records Lua 5.4 support work in 2020, and LuaLS now documents support for Lua 5.4 alongside other Lua versions.

### 使用方式

Users install lua@5.4 when a script, embedded application, or Lua C module expects the 5.4 API or executable naming. The package provides lua and luac variants for the 5.4 series and does not require a runtime configuration or credentials file.

Packagers treat lua@5.4 as a compatibility runtime. It lets formulas pin to Lua 5.4 while the unversioned lua package moves forward, reducing accidental ABI and behavior changes for embedded users.

### 为什么软件包爱好者会关心

lua@5.4 is package-nerd material because it is all about versioning discipline. The package preserves an ABI and language line that other packages can depend on, which is exactly why language runtimes often live in both current and versioned formulas.

### 时间线

- 1993: Lua was created at PUC-Rio.
- 2020-06-29: Lua 5.4 was released.
- 2020: Lua 5.4 introduced generational garbage collection mode and const/to-be-closed variables.
- 2025-06-04: The official version history lists Lua 5.4.8 as a current 5.4 release.

### Related projects

- Lua is the unversioned current formula for the same reference implementation family.
- LuaRocks commonly installs modules against a specific Lua minor version.
- LuaLS and Luacheck both document support for Lua 5.4 language semantics.
- LuaJIT remains important for Lua 5.1-family compatibility, making versioned Lua packages part of normal Lua ecosystem work.

### 来源

- <https://raw.githubusercontent.com/lua/lua/master/README.md>
- <https://www.lua.org/manual/5.4/manual.html>
- <https://www.lua.org/manual/5.4/readme.html>
- <https://www.lua.org/versions.html>
- source_facts.package-manager


## 安全说明

没有找到 lua@5.4 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** lua@5.4
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** yes
- **URL Keys:** stable

## 其他软件包管理器记录

- Debian apt - liblua5.4-0 - 5.4.7-1+b2: package manager index match | Debian stable package indexes: liblua5.4-0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Shared library for the Lua interpreter version 5.4 | http://www.lua.org
- Debian apt - liblua5.4-dev - 5.4.7-1+b2: package manager index match | Debian stable package indexes: liblua5.4-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development files for the Lua language version 5.4 | http://www.lua.org
- Debian apt - lua5.4 - 5.4.7-1+b2: package manager index match | Debian stable package indexes: lua5.4 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Simple, extensible, embeddable programming language | http://www.lua.org
- Ubuntu apt - liblua5.4-0 - 5.4.6-3build2: package manager index match | Ubuntu 24.04 LTS package indexes: liblua5.4-0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Shared library for the Lua interpreter version 5.4 | http://www.lua.org
- Ubuntu apt - liblua5.4-dev - 5.4.6-3build2: package manager index match | Ubuntu 24.04 LTS package indexes: liblua5.4-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Development files for the Lua language version 5.4 | http://www.lua.org
- Ubuntu apt - lua5.4 - 5.4.6-3build2: package manager index match | Ubuntu 24.04 LTS package indexes: lua5.4 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Simple, extensible, embeddable programming language | http://www.lua.org
- apk - lua5.4 - 5.4.8-r0: package manager index match | Alpine Linux edge package indexes: lua5.4 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Powerful light-weight programming language | https://www.lua.org/
- apk - lua5.4-dbg - 5.4.8-r0: package manager index match | Alpine Linux edge package indexes: lua5.4-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Powerful light-weight programming language (debug symbols) | https://www.lua.org/
- apk - lua5.4-dev - 5.4.8-r0: package manager index match | Alpine Linux edge package indexes: lua5.4-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Powerful light-weight programming language (development files) | https://www.lua.org/
- apk - lua5.4-doc - 5.4.8-r0: package manager index match | Alpine Linux edge package indexes: lua5.4-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Powerful light-weight programming language (documentation) | https://www.lua.org/
- apk - lua5.4-libs - 5.4.8-r0: package manager index match | Alpine Linux edge package indexes: lua5.4-libs from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Lua dynamic library runtime | https://www.lua.org/
- pacman - lua54 - 5.4.8-6: package manager index match | Arch Linux sync databases: lua54 from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Powerful lightweight programming language designed for extending applications | https://www.lua.org/
- zypper - liblua5_4-5 - 5.4.8-4.6: package manager index match | openSUSE Tumbleweed package metadata: liblua5_4-5 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | The Lua integration library | https://www.lua.org
- zypper - liblua5_4-5-32bit - 5.4.8-4.6: package manager index match | openSUSE Tumbleweed package metadata: liblua5_4-5-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | The Lua integration library | https://www.lua.org
- zypper - lua54 - 5.4.8-4.6: package manager index match | openSUSE Tumbleweed package metadata: lua54 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Small Embeddable Language with Procedural Syntax | https://www.lua.org
- zypper - lua54-devel - 5.4.8-4.6: package manager index match | openSUSE Tumbleweed package metadata: lua54-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for lua | https://www.lua.org


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [lmod](https://pkg.so/zh-hans/brew/lmod/) - Popular package that depends on this formula.
- [dovecot](https://pkg.so/zh-hans/brew/dovecot/) - Popular package that depends on this formula.
- [lsyncd](https://pkg.so/zh-hans/brew/lsyncd/) - Popular package that depends on this formula.
- [vis](https://pkg.so/zh-hans/brew/vis/) - Popular package that depends on this formula.
- [wxlua](https://pkg.so/zh-hans/brew/wxlua/) - Popular package that depends on this formula.
- [lua](https://pkg.so/zh-hans/brew/lua/) - Package name indicates the same formula family.
- [luau](https://pkg.so/zh-hans/brew/luau/) - Shares pkgdb curated category or tags: cli, embeddable, language-runtime, lua, programming-language.
- [ruby](https://pkg.so/zh-hans/brew/ruby/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, programming-language, scripting.
- [gauche](https://pkg.so/zh-hans/brew/gauche/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, programming-language, scripting.
- [gambit-scheme](https://pkg.so/zh-hans/brew/gambit-scheme/) - Shares pkgdb curated category or tags: cli, compiler, interpreter, language-runtime, programming-language.
- [janet](https://pkg.so/zh-hans/brew/janet/) - Shares pkgdb curated category or tags: cli, embeddable, language-runtime, programming-language, scripting.
- [fennel](https://pkg.so/zh-hans/brew/fennel/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime, lua, programming-language.
- [algol68g](https://pkg.so/zh-hans/brew/algol68g/) - Shares pkgdb curated category or tags: cli, compiler, interpreter, language-runtime, programming-language.
- [picat](https://pkg.so/zh-hans/brew/picat/) - Local package facts share a topical domain. Shared terms: cli, interpreter, language, language-runtime, powerful.

## Combined YAML source

View the package source record on GitHub. [combined/lua@5.4.yml](https://github.com/mxcl/pkgdb/blob/main/combined/lua@5.4.yml)


## 来源

- pkg.so package database
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
