# 使用 Homebrew, apk, apt, MacPorts, Nix, pacman, zypper 安装 mruby

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

## 安装

```sh
sudo av install brew:mruby
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mruby
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mruby
```

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

### Linux

- apk (92%):

```sh
sudo apk add mruby
```

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

- Debian apt (92%):

```sh
sudo apt install mruby
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#mruby
```

  证据: nixpkgs package indexes: pkgs/by-name/mr/mruby/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S mruby
```

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

- zypper (92%):

```sh
sudo zypper install mruby
```

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

## 软件包事实

- **软件包键:** brew:mruby
- **软件包管理器:** Homebrew
- **版本:** 4.0.0
- **来源摘要:** Lightweight implementation of the Ruby language
- **主页:** <https://mruby.org/>
- **仓库:** <https://github.com/mruby/mruby>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- mirb (别名)
- mrbc (别名)
- mruby (别名)
- mruby-config (别名)
- mruby-strip (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 4.0.0
## 项目历史与用法

mruby is a lightweight, embeddable implementation of Ruby associated with Ruby creator Yukihiro Matsumoto and the mruby contributors. The official site describes it as complying with part of the ISO/IEC 30170 Ruby specification and designed to be linked into applications where MRI Ruby is too heavy. The project also acknowledges sponsorship by Japan's Ministry of Economy, Trade and Industry Regional Innovation Creation R&D Programs.

### 项目历史

The toolchain is deliberately small and embeddable. It provides the mruby interpreter, the mirb interactive shell, and mrbc, a compiler that emits mruby bytecode and can generate bytecode as a C source file. The GitHub README describes linking mruby into C or C++ applications, using the bin tools as examples, and customizing builds with mrbgems.

### 使用方式

mruby's ecosystem role differs from the main Ruby implementation. It targets constrained environments, native applications, firmware-like embeddings, and products that want Ruby syntax without shipping a full MRI runtime. The release history on the official site records 1.0.0 in February 2014 and later 2.x, 3.x, and 4.x lines, reflecting a long-running compatibility and maintenance effort. Package managers expose the command-line tools and development library for developers embedding Ruby behavior or compiling scripts into bytecode.

### 来源

- <https://formulae.brew.sh/formula/mruby>
- <https://github.com/mruby/mruby>
- <https://mruby.org/>
- <https://mruby.org/about/>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

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

- Debian apt - libmruby-dev - 3.3.0-1: normalized package name match | Debian stable package indexes: libmruby-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | lightweight implementation of the Ruby language (development files) | https://mruby.org/
- Debian apt - mruby - 3.3.0-1: normalized package name match | Debian stable package indexes: mruby from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | lightweight implementation of the Ruby language | https://mruby.org/
- Nix - mruby: normalized package name match | nixpkgs package indexes: pkgs/by-name/mr/mruby/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libmruby-dev - 3.2.0-2: normalized package name match | Ubuntu 24.04 LTS package indexes: libmruby-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | lightweight implementation of the Ruby language (development files) | https://mruby.org/
- Ubuntu apt - mruby - 3.2.0-2: normalized package name match | Ubuntu 24.04 LTS package indexes: mruby from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | lightweight implementation of the Ruby language | https://mruby.org/
- apk - mruby - 3.3.0-r0: normalized package name match | Alpine Linux edge package indexes: mruby from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Lightweight Ruby | https://mruby.org
- apk - mruby-dev - 3.3.0-r0: normalized package name match | Alpine Linux edge package indexes: mruby-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Lightweight Ruby (development files) | https://mruby.org
- apk - mruby-tools - 3.3.0-r0: normalized package name match | Alpine Linux edge package indexes: mruby-tools from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Lightweight Ruby (tools) | https://mruby.org
- pacman - mruby - 3.3.0-2: normalized package name match | Arch Linux sync databases: mruby from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | An interpreter for the Ruby programming language with the intention of being lightweight and easily embeddable | https://github.com/mruby/mruby
- zypper - libmruby3_4_0 - 3.4.0-1.6: normalized package name match | openSUSE Tumbleweed package metadata: libmruby3_4_0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Lightweight Ruby Embedded Environment | https://github.com/mruby/mruby/
- zypper - libmruby_core3_4_0 - 3.4.0-1.6: normalized package name match | openSUSE Tumbleweed package metadata: libmruby_core3_4_0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Lightweight Ruby Embedded Environment | https://github.com/mruby/mruby/
- zypper - mruby - 3.4.0-1.6: normalized package name match | openSUSE Tumbleweed package metadata: mruby from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Lightweight Ruby | https://github.com/mruby/mruby/
- zypper - mruby-devel - 3.4.0-1.6: normalized package name match | openSUSE Tumbleweed package metadata: mruby-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Lightweight Ruby Embedded Environment | https://github.com/mruby/mruby/
- MacPorts - mruby: normalized package name match | MacPorts ports tree: lang/mruby/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
