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

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

## 安装

```sh
sudo av install brew:librsvg
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install librsvg
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install librsvg
```

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

### Linux

- apk (92%):

```sh
sudo apk add librsvg
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#librsvg
```

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

- pacman (92%):

```sh
sudo pacman -S librsvg
```

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

- Debian apt (92%):

```sh
sudo apt install gir1.2-rsvg-2.0
```

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

- zypper (92%):

```sh
sudo zypper install librsvg-2-2
```

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

### Windows

- Chocolatey (92%):

```sh
choco install rsvg-convert
```

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

## 软件包事实

- **软件包键:** brew:librsvg
- **软件包管理器:** Homebrew
- **版本:** 2.62.3
- **来源摘要:** Library to render SVG files using Cairo
- **主页:** <https://wiki.gnome.org/Projects/LibRsvg>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- rsvg-convert (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

librsvg is GNOME's long-running SVG rendering library and the source of the rsvg-convert command-line tool. It matters in package-manager culture because a small SVG renderer package often sits underneath icon themes, desktop thumbnailers, documentation builds, and scripts that convert SVG assets into raster or PDF outputs.

### 项目历史

The librsvg development guide describes the project as starting around 2001, when Eazel needed SVG rendering for Nautilus while SVG itself was still being standardized. Early librsvg used libxml2's SAX parser and libart, then moved to Cairo and grew into a GObject-based GNOME platform library with a stable C API and ABI.

In 2016 the project began porting internals to Rust. By early 2021 the architecture documentation described the implementation as Rust while keeping the public C API and ABI intact, an unusual migration path that let distributions and GNOME consumers keep the same package surface while the internals changed language.

### 采用历史

GNOME documents librsvg as part of the GNOME platform libraries: Gnome Shell uses it for SVG assets such as icons, applications can link to librsvg directly, and a gdk-pixbuf loader lets programs load SVG documents through the same path as raster image formats.

The rsvg-convert executable is documented by the project as a widely used tool whose command-line options are kept stable because many scripts and systems depend on it.

### 使用方式

Developers use the C API through librsvg-2.0, use GObject Introspection bindings from other languages, or invoke rsvg-convert to render SVG documents to other formats. Desktop environments also use the gdk-pixbuf SVG loader and thumbnailer artifacts produced by the build.

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

librsvg is a classic small-but-foundational package: it pulls together XML parsing, CSS/SVG rendering, Cairo output, GNOME ABI stability, Rust internals, and a CLI converter. Packagers care about it because SVG rendering regressions can show up as broken icons, bad documentation assets, or failed build pipelines far from the library itself.

### 时间线

- 2001: Started around Eazel and Nautilus to render SVG images in GNOME.
- 2013: The 2.40.0 tag began a long stable release series.
- 2016: Rust porting work began inside the project.
- 2017: The 2.41.0 tag opened the Rust-era development series.
- 2021: Project architecture documentation described the library implementation as Rust with the C API and ABI preserved.
- 2023: Version 2.57.0 made librsvg available as a regular Rust crate on crates.io.

### Related projects

- Related projects include GNOME, Nautilus, Cairo, libxml2, gdk-pixbuf, crates.io, and the SVG specification.

### 来源

- <https://gitlab.gnome.org/GNOME/librsvg>
- <https://gnome.pages.gitlab.gnome.org/librsvg/Rsvg-2.0/index.html>
- <https://gnome.pages.gitlab.gnome.org/librsvg/devel-docs/architecture.html>
- <https://gnome.pages.gitlab.gnome.org/librsvg/devel-docs/product.html>


## 安全说明

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


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

- Debian apt - gir1.2-rsvg-2.0 - 2.60.0+dfsg-1: normalized package name match | Debian stable package indexes: gir1.2-rsvg-2.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | gir files for renderer library for SVG files | https://wiki.gnome.org/Projects/LibRsvg
- Debian apt - librsvg2-2 - 2.60.0+dfsg-1: normalized package name match | Debian stable package indexes: librsvg2-2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | SAX-based renderer library for SVG files (runtime) | https://wiki.gnome.org/Projects/LibRsvg
- Debian apt - librsvg2-bin - 2.60.0+dfsg-1: normalized package name match | Debian stable package indexes: librsvg2-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command-line utility to convert SVG files | https://wiki.gnome.org/Projects/LibRsvg
- Debian apt - librsvg2-common - 2.60.0+dfsg-1: normalized package name match | Debian stable package indexes: librsvg2-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | SAX-based renderer library for SVG files (extra runtime) | https://wiki.gnome.org/Projects/LibRsvg
- Debian apt - librsvg2-dev - 2.60.0+dfsg-1: normalized package name match | Debian stable package indexes: librsvg2-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | SAX-based renderer library for SVG files (development) | https://wiki.gnome.org/Projects/LibRsvg
- Debian apt - librsvg2-doc - 2.60.0+dfsg-1: normalized package name match | Debian stable package indexes: librsvg2-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | SAX-based renderer library for SVG files (documentation) | https://wiki.gnome.org/Projects/LibRsvg
- Debian apt - librsvg2-tests - 2.60.0+dfsg-1: normalized package name match | Debian stable package indexes: librsvg2-tests from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | automated tests for RSVG library | https://wiki.gnome.org/Projects/LibRsvg
- Nix - librsvg: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/librsvg/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gir1.2-rsvg-2.0 - 2.58.0+dfsg-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: gir1.2-rsvg-2.0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | gir files for renderer library for SVG files | https://wiki.gnome.org/Projects/LibRsvg
- Ubuntu apt - librsvg2-2 - 2.58.0+dfsg-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: librsvg2-2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | SAX-based renderer library for SVG files (runtime) | https://wiki.gnome.org/Projects/LibRsvg
- Ubuntu apt - librsvg2-bin - 2.58.0+dfsg-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: librsvg2-bin from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command-line utility to convert SVG files | https://wiki.gnome.org/Projects/LibRsvg
- Ubuntu apt - librsvg2-common - 2.58.0+dfsg-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: librsvg2-common from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | SAX-based renderer library for SVG files (extra runtime) | https://wiki.gnome.org/Projects/LibRsvg
- Ubuntu apt - librsvg2-dev - 2.58.0+dfsg-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: librsvg2-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | SAX-based renderer library for SVG files (development) | https://wiki.gnome.org/Projects/LibRsvg
- Ubuntu apt - librsvg2-doc - 2.58.0+dfsg-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: librsvg2-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | SAX-based renderer library for SVG files (documentation) | https://wiki.gnome.org/Projects/LibRsvg
- Ubuntu apt - librsvg2-tests - 2.58.0+dfsg-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: librsvg2-tests from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | automated tests for RSVG library | https://wiki.gnome.org/Projects/LibRsvg
- apk - librsvg - 2.62.3-r0: normalized package name match | Alpine Linux edge package indexes: librsvg from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library to render SVG images to Cairo surfaces | https://gitlab.gnome.org/GNOME/librsvg


## Combined YAML source

View the package source record on GitHub. [combined/librsvg.yml](https://github.com/mxcl/pkgdb/blob/main/combined/librsvg.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
