# 使用 Homebrew, dnf, MacPorts, Nix, pacman, apt, zypper 安装 libtar

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

## 安装

```sh
sudo av install brew:libtar
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libtar
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libtar
```

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

### Linux

- dnf (92%):

```sh
sudo dnf install libtar
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#libtar
```

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

- pacman (92%):

```sh
sudo pacman -S libtar
```

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

- Ubuntu apt (92%):

```sh
sudo apt install libtar-dev
```

  证据: Ubuntu 24.04 LTS package indexes: libtar-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

- zypper (92%):

```sh
sudo zypper install libtar
```

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

## 软件包事实

- **软件包键:** brew:libtar
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/libtar>
- **版本:** 1.2.20
- **来源摘要:** C library for manipulating POSIX tar files
- **主页:** <https://repo.or.cz/libtar.git>
- **仓库:** <https://repo.or.cz/libtar.git>
- **上游文档:** <https://repo.or.cz/libtar.git>
- **许可证:** NCSA
- **源码归档:** <https://repo.or.cz/libtar.git>
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- libtar (cli)
- libtar (别名)

## 构建依赖

- autoconf
- automake
- libtool

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 1.2.20
- 本地数据: OK
- 上游仓库: https://repo.or.cz/libtar
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

libtar is a small C library for manipulating POSIX tar archives. Its history is thinly documented, but the maintained source page identifies it as a Mark Roth project kept alive through a maintenance repository for packagers and downstream users.

### 项目历史

The package is associated with Mark Roth and the University of Illinois era of late-1990s and early-2000s Unix utility code. The repo.or.cz project page describes the hosted tree as a maintenance repository for libtar, temporarily run by Chris Frey until Mark Roth resumed development.

The maintained repository shifted the project from tarball-style upstream releases toward tagged source snapshots. The page explicitly says no tarball releases would be done from that maintenance repo and directs users to grab tagged sources instead.

### 采用历史

libtar's adoption is mostly downstream and infrastructural rather than user-facing. The input metadata shows packaging in Homebrew, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE families, which matches its niche as a C library that other software can link when it needs tar archive operations without invoking the tar command.

### 使用方式

The library is used by C programs that need to read, write, append, or extract tar archives through an API. Its appeal is that it gives applications direct archive manipulation while preserving familiar POSIX tar semantics.

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

libtar is package-nerd glue: a small C dependency that exists so build systems and applications do not need to shell out or vendor tar handling. Its repo.or.cz maintenance status also illustrates a common packaging reality: useful libraries can outlive their original release process because distributions still need a canonical source.

### 时间线

- 1998-2003: Copyright ranges in downstream source copies identify the original Mark Roth and University of Illinois development period.
- 2013: The repo.or.cz maintenance repository records libtar 1.2.20 and a short burst of portability and correctness fixes.
- 2013: The maintained repository states that tagged source snapshots, rather than new tarball releases from that tree, are the distribution path.

### Related projects

- GNU tar and libarchive occupy adjacent archive-handling territory; libtar is narrower, with a C API focused on tar files.

### 来源

- <https://github.com/Parrot-Developers/libtar>
- <https://github.com/tklauser/libtar/blob/master/lib/libtar.h>
- <https://repo.or.cz/libtar.git>


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

## 源数据库详情

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

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

- Nix - libtar: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libtar/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libtar-dev - 1.2.20-8.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libtar-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | C library for manipulating tar archives (development files) | http://repo.or.cz/w/libtar.git
- Ubuntu apt - libtar0t64 - 1.2.20-8.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libtar0t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | C library for manipulating tar archives | http://repo.or.cz/w/libtar.git
- dnf - libtar - 1.2.20-35.fc44: normalized package name match | Fedora Rawhide package metadata: libtar from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Tar file manipulation API | http://repo.or.cz/libtar.git
- dnf - libtar-devel - 1.2.20-35.fc44: normalized package name match | Fedora Rawhide package metadata: libtar-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for libtar | http://repo.or.cz/libtar.git
- pacman - libtar - 1.2.20-8: normalized package name match | Arch Linux sync databases: libtar from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | C library for manipulating POSIX tar files | https://repo.or.cz/w/libtar.git
- zypper - libtar - 1.2.20-2.27: normalized package name match | openSUSE Tumbleweed package metadata: libtar from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Tar file manipulation API | http://www.feep.net/libtar/
- zypper - libtar-devel - 1.2.20-2.27: normalized package name match | openSUSE Tumbleweed package metadata: libtar-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development files for libtar | http://www.feep.net/libtar/
- zypper - libtar1 - 1.2.20-2.27: normalized package name match | openSUSE Tumbleweed package metadata: libtar1 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Shared library for libtar | http://www.feep.net/libtar/
- MacPorts - libtar: normalized package name match | MacPorts ports tree: devel/libtar/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Archive and compression packages](https://www.automicvault.com/zh-hans/pkg/archive-compression-tools/) - Matched archive or compression metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [autoconf](https://www.automicvault.com/zh-hans/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://www.automicvault.com/zh-hans/pkg/brew/automake/) - Build dependency declared by Homebrew.
- [libtool](https://www.automicvault.com/zh-hans/pkg/brew/libtool/) - Build dependency declared by Homebrew.
- [libsql](https://www.automicvault.com/zh-hans/pkg/brew/libsql/) - Shares av.db curated category or tags: cli, not-completed, other.
- [libstatgrab](https://www.automicvault.com/zh-hans/pkg/brew/libstatgrab/) - Shares av.db curated category or tags: cli, not-completed, other.
- [libstxxl](https://www.automicvault.com/zh-hans/pkg/brew/libstxxl/) - Shares av.db curated category or tags: cli, not-completed, other.
- [libsvm](https://www.automicvault.com/zh-hans/pkg/brew/libsvm/) - Shares av.db curated category or tags: cli, not-completed, other.
- [libtasn1](https://www.automicvault.com/zh-hans/pkg/brew/libtasn1/) - Shares av.db curated category or tags: cli, not-completed, other.
- [libtecla](https://www.automicvault.com/zh-hans/pkg/brew/libtecla/) - Shares av.db curated category or tags: cli, not-completed, other.
- [libtensorflow](https://www.automicvault.com/zh-hans/pkg/brew/libtensorflow/) - Shares av.db curated category or tags: cli, not-completed, other.
- [libtiff](https://www.automicvault.com/zh-hans/pkg/brew/libtiff/) - Shares av.db curated category or tags: cli, not-completed, other.

## Combined YAML source

View the package source record on GitHub. [combined/libtar.yml](https://github.com/automic-vault/db/blob/main/combined/libtar.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
