# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper, scoop, winget 安装 luajit

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

## 安装

```sh
sudo av install brew:luajit
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install luajit
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install luajit
```

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

### Linux

- apk (92%):

```sh
sudo apk add luajit
```

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

- Debian apt (92%):

```sh
sudo apt install luajit
```

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

- dnf (92%):

```sh
sudo dnf install luajit
```

  证据: Fedora Rawhide package metadata: luajit 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#luajit
```

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

- pacman (92%):

```sh
sudo pacman -S luajit
```

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

- zypper (92%):

```sh
sudo zypper install luajit
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/luajit
```

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

- winget (92%):

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

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

## 软件包事实

- **软件包键:** brew:luajit
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/luajit>
- **版本:** 2.1.1785763465
- **来源摘要:** Just-In-Time Compiler (JIT) for the Lua programming language
- **主页:** <https://luajit.org/luajit.html>
- **仓库:** <https://github.com/LuaJIT/LuaJIT>
- **上游文档:** <https://luajit.org/luajit.html>
- **许可证:** MIT
- **源码归档:** <https://github.com/LuaJIT/LuaJIT/archive/1edc3e52b67eaf6ce5f809be8e17d6862594b8bc.tar.gz>
- **最后更新:** 2026-08-03T19:19:53Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- luajit (cli)
- luajit-2.1.1785577137 (cli)
- luajit (别名)
- luajit-2.1.1785577137 (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.1.1785763465
- 管理器更新时间: 2026-08-03
- 本地数据: OK
- 上游仓库: https://github.com/LuaJIT/LuaJIT
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

LuaJIT is a just-in-time compiler and high-performance Lua 5.1-compatible runtime. It became one of the defining alternative Lua runtimes because it combines a fast interpreter, trace JIT compiler, FFI, and broad embedding support.

### 项目历史

LuaJIT is authored by Mike Pall and has been in continuous development since 2005. The official overview describes it as a JIT compiler for Lua that can be embedded or used as a standalone language runtime.

LuaJIT 2.0 was a major rewrite of the VM, combining an assembler-written interpreter with a trace compiler and SSA-based optimizations. The official extensions documentation also makes clear why LuaJIT became more than a faster lua executable: it adds the FFI library, built-in bit operations, JIT control modules, profiler support, and Lua/C API extensions while remaining API and ABI compatible with Lua 5.1.

### 采用历史

The official LuaJIT overview says it has been used in games, appliances, network and graphics applications, numerical simulations, trading platforms, and other specialty applications, and is part of large web, SaaS, networking, set-top-box, and embedded deployments.

Package-manager adoption is broad: the input metadata lists LuaJIT packages for Homebrew, MacPorts, Debian, Ubuntu, Fedora, Alpine, Arch, openSUSE, Nix, Scoop, and Winget. That distribution footprint reflects LuaJIT's role as both a developer tool and a dependency of packages that want Lua speed or LuaJIT FFI.

### 使用方式

The normal command-line entry point is luajit on POSIX systems and luajit.exe on Windows. It runs Lua chunks, scripts, and interactive sessions, and it supports Lua-like CLI options plus LuaJIT-specific bytecode, JIT-control, and optimization switches.

In package ecosystems, LuaJIT is commonly selected when a project targets Lua 5.1 semantics but wants faster execution, C interop through FFI, or compatibility with ecosystems such as OpenResty and LuaJIT-oriented LuaRocks modules.

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

LuaJIT is package-nerd-famous because it sits at the intersection of language runtime, C ABI, and distribution policy. The project now uses rolling releases from git rather than release tarballs, so downstream packages often package snapshots and must track branch policy carefully.

It also explains a lot of Lua packaging behavior: LuaRocks modules may distinguish Lua versions, LuaJIT, FFI availability, and ABI compatibility. Having LuaJIT as a separate package lets distributions provide both stock Lua and the high-performance Lua 5.1-compatible runtime.

### 时间线

- 2005: LuaJIT development begins.
- 2010s: LuaJIT 2.0 rewrites the VM around a fast interpreter and trace compiler.
- 2020s: LuaJIT documents rolling releases and recommends following versioned branches rather than old tarball-style releases.
- 2026: Official status page lists v2.1 as the production branch.

### Related projects

- Lua is the upstream language whose 5.1 API and ABI LuaJIT targets.
- OpenResty maintains its own LuaJIT branch for nginx/OpenResty workloads.
- LuaRocks packages Lua modules that may run on LuaJIT or depend on LuaJIT-specific FFI behavior.

### 来源

- <https://luajit.org/download.html>
- <https://luajit.org/extensions.html>
- <https://luajit.org/luajit.html>
- <https://luajit.org/running.html>
- <https://luajit.org/status.html>
- source_facts.package-manager


## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- generalized runtime or code generation signal

## 源数据库详情

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

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

- Debian apt - libluajit-5.1-2 - 2.1.0+openresty20250117-2: normalized package name match | Debian stable package indexes: libluajit-5.1-2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenResty-maintained branch of LuaJIT (shared objects) | https://github.com/openresty/luajit2
- Debian apt - libluajit-5.1-common - 2.1.0+openresty20250117-2: normalized package name match | Debian stable package indexes: libluajit-5.1-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenResty-maintained branch of LuaJIT (common files) | https://github.com/openresty/luajit2
- Debian apt - libluajit-5.1-dev - 2.1.0+openresty20250117-2: normalized package name match | Debian stable package indexes: libluajit-5.1-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenResty-maintained branch of LuaJIT (development files) | https://github.com/openresty/luajit2
- Debian apt - luajit - 2.1.0+openresty20250117-2: normalized package name match | Debian stable package indexes: luajit from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenResty-maintained branch of LuaJIT (interpreter) | https://github.com/openresty/luajit2
- Nix - luajit: normalized package name match | nixpkgs package indexes: luajit from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - libluajit-5.1-2 - 2.1.0+git20231223.c525bcb+dfsg-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libluajit-5.1-2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Just in time compiler for Lua - library version | https://luajit.org
- Ubuntu apt - libluajit-5.1-common - 2.1.0+git20231223.c525bcb+dfsg-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libluajit-5.1-common from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Just in time compiler for Lua - common files | https://luajit.org
- Ubuntu apt - libluajit-5.1-dev - 2.1.0+git20231223.c525bcb+dfsg-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libluajit-5.1-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Just in time compiler for Lua - development files | https://luajit.org
- Ubuntu apt - luajit - 2.1.0+git20231223.c525bcb+dfsg-1: normalized package name match | Ubuntu 24.04 LTS package indexes: luajit from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Just in time compiler for Lua programming language version 5.1 | https://luajit.org
- apk - luajit - 2.1_p20251030-r0: normalized package name match | Alpine Linux edge package indexes: luajit from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | OpenResty's branch of LuaJIT | https://github.com/openresty/luajit2
- apk - luajit-dbg - 2.1_p20251030-r0: normalized package name match | Alpine Linux edge package indexes: luajit-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | OpenResty's branch of LuaJIT (debug symbols) | https://github.com/openresty/luajit2
- apk - luajit-dev - 2.1_p20251030-r0: normalized package name match | Alpine Linux edge package indexes: luajit-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | OpenResty's branch of LuaJIT (development files) | https://github.com/openresty/luajit2
- apk - luajit-doc - 2.1_p20251030-r0: normalized package name match | Alpine Linux edge package indexes: luajit-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | OpenResty's branch of LuaJIT (documentation) | https://github.com/openresty/luajit2
- dnf - luajit - 2.1.1767980792-2.fc45: normalized package name match | Fedora Rawhide package metadata: luajit from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Just-In-Time Compiler for Lua | http://luajit.org
- dnf - luajit-devel - 2.1.1767980792-2.fc45: normalized package name match | Fedora Rawhide package metadata: luajit-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Development files for luajit | http://luajit.org
- pacman - luajit - 2.1.1785763465+1edc3e5-1: normalized package name match | Arch Linux sync databases: luajit from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Just-in-time compiler and drop-in replacement for Lua 5.1 | https://luajit.org/


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [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.
- [neovim](https://pkg.so/zh-hans/brew/neovim/) - Popular package that depends on this formula.
- [mpv](https://pkg.so/zh-hans/brew/mpv/) - Popular package that depends on this formula.
- [texlive](https://pkg.so/zh-hans/brew/texlive/) - Popular package that depends on this formula.
- [wrk](https://pkg.so/zh-hans/brew/wrk/) - Popular package that depends on this formula.
- [fluent-bit](https://pkg.so/zh-hans/brew/fluent-bit/) - Popular package that depends on this formula.
- [snort](https://pkg.so/zh-hans/brew/snort/) - Popular package that depends on this formula.
- [sysbench](https://pkg.so/zh-hans/brew/sysbench/) - Popular package that depends on this formula.
- [sysdig](https://pkg.so/zh-hans/brew/sysdig/) - Popular package that depends on this formula.
- [luajit-openresty](https://pkg.so/zh-hans/brew/luajit-openresty/) - Shares pkgdb curated category or tags: cli, jit-compiler, language-runtime, lua, runtime.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, runtime.
- [python@3.13](https://pkg.so/zh-hans/brew/python-3-13/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, runtime.
- [python@3.12](https://pkg.so/zh-hans/brew/python-3-12/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, runtime.
- [python@3.11](https://pkg.so/zh-hans/brew/python-3-11/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, runtime.
- [python@3.10](https://pkg.so/zh-hans/brew/python-3-10/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, runtime.
- [lua](https://pkg.so/zh-hans/brew/lua/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, lua.
- [python@3.9](https://pkg.so/zh-hans/brew/python-3-9/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, runtime.
- [gerbil-scheme](https://pkg.so/zh-hans/brew/gerbil-scheme/) - Local package facts share a topical domain. Shared terms: cli, compiler, ffi, interpreter, language.
- [fennel](https://pkg.so/zh-hans/brew/fennel/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, compiler, language, language-runtime, lua.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- 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
