# 使用 Homebrew, apk, dnf, Nix, pacman, apt, zypper 安装 liblockfile

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

## 安装

```sh
sudo av install brew:liblockfile
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install liblockfile
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add liblockfile
```

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

- dnf (92%):

```sh
sudo dnf install liblockfile
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#liblockfile
```

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

- pacman (92%):

```sh
sudo pacman -S liblockfile
```

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

- Debian apt (92%):

```sh
sudo apt install liblockfile-bin
```

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

- zypper (92%):

```sh
sudo zypper install liblockfile-devel
```

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

## 软件包事实

- **软件包键:** brew:liblockfile
- **软件包管理器:** Homebrew
- **版本:** 1.17
- **来源摘要:** Library providing functions to lock standard mailboxes
- **主页:** <https://tracker.debian.org/pkg/liblockfile>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- dotlockfile (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

liblockfile is a small Unix system library and utility package for creating NFS-safe lockfiles, especially the dot-lock files traditionally used to protect mailboxes in /var/mail.

### 项目历史

The upstream README describes liblockfile as an implementation of functions found in -lmail on SysV systems, extended with functions to create, manage, and remove generic lockfiles. Its locking algorithm uses a temporary file and link(2) to create lockfiles atomically, including workarounds for NFS server behavior.

The dotlockfile utility is documented as a command-line tool to create, test, touch, and remove lockfiles. Its name comes from the traditional mailbox convention of appending .lock to the mailbox path.

### 采用历史

liblockfile has a long Debian packaging history and remains represented as Debian source package liblockfile, producing liblockfile-bin, liblockfile-dev, and liblockfile1. Its practical audience is mail tools, shell scripts, and legacy Unix software that need interoperable dot-locking rather than newer advisory-lock APIs.

### 使用方式

The library is used by programs that need NFS-safe lock creation. The dotlockfile command is used directly in scripts or as the setgid mail helper that lets mailbox-locking programs avoid carrying setgid mail themselves.

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

liblockfile is interesting because it packages an old but still sharp Unix portability problem: locking mail spools safely across local and NFS filesystems. It is small, unglamorous infrastructure that explains why some packages still ship helpers for mail-era filesystem semantics.

### 时间线

- 2011: Changelog entry for liblockfile 1.09 recorded Debian bug fixes and cross-build cleanup.
- 2016: Upstream GitHub repository created on November 22, 2016.
- 2017: dotlockfile manual page dated January 10, 2017.
- 2019: liblockfile 1.16 simplified permission checking and quiet-mode behavior.
- 2021: liblockfile 1.17 added dotlockfile -P and -i options.

### Related projects

- The README names procmail, exim, and mutt as compatible NFS-safe lockfile users.
- Debian packaging is maintained separately at the liblockfile-debian repository.

### 来源

- <https://api.github.com/repos/miquels/liblockfile>
- <https://github.com/miquels/liblockfile>
- <https://packages.debian.org/source/trixie/liblockfile>
- <https://raw.githubusercontent.com/miquels/liblockfile/master/Changelog>
- <https://raw.githubusercontent.com/miquels/liblockfile/master/dotlockfile.1>


## 安全说明

library-like package without higher-risk signals.

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

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

- Debian apt - liblockfile-bin - 1.17-2: normalized package name match | Debian stable package indexes: liblockfile-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | support binaries for and cli utilities based on liblockfile | https://github.com/miquels/liblockfile
- Debian apt - liblockfile-dev - 1.17-2: normalized package name match | Debian stable package indexes: liblockfile-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development library for liblockfile | https://github.com/miquels/liblockfile
- Debian apt - liblockfile1 - 1.17-2: normalized package name match | Debian stable package indexes: liblockfile1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | NFS-safe locking library | https://github.com/miquels/liblockfile
- Nix - liblockfile: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/liblockfile/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - liblockfile-bin - 1.17-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: liblockfile-bin from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | support binaries for and cli utilities based on liblockfile | https://github.com/miquels/liblockfile
- Ubuntu apt - liblockfile-dev - 1.17-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: liblockfile-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Development library for liblockfile | https://github.com/miquels/liblockfile
- Ubuntu apt - liblockfile1 - 1.17-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: liblockfile1 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | NFS-safe locking library | https://github.com/miquels/liblockfile
- apk - liblockfile - 1.17-r4: normalized package name match | Alpine Linux edge package indexes: liblockfile from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Shared library with NFS-safe locking functions | https://github.com/miquels/liblockfile
- apk - liblockfile-dev - 1.17-r4: normalized package name match | Alpine Linux edge package indexes: liblockfile-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Shared library with NFS-safe locking functions (development files) | https://github.com/miquels/liblockfile
- apk - liblockfile-doc - 1.17-r4: normalized package name match | Alpine Linux edge package indexes: liblockfile-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Shared library with NFS-safe locking functions (documentation) | https://github.com/miquels/liblockfile
- apk - liblockfile-static - 1.17-r4: normalized package name match | Alpine Linux edge package indexes: liblockfile-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Shared library with NFS-safe locking functions (static library) | https://github.com/miquels/liblockfile
- dnf - liblockfile - 1.17-13.fc45: normalized package name match | Fedora Rawhide package metadata: liblockfile from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | This implements a number of functions found in -lmail on SysV systems | http://packages.qa.debian.org/libl/liblockfile.html
- dnf - liblockfile-devel - 1.17-13.fc45: normalized package name match | Fedora Rawhide package metadata: liblockfile-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for liblockfile | http://packages.qa.debian.org/libl/liblockfile.html
- pacman - liblockfile - 1.17_2-1: normalized package name match | Arch Linux sync databases: liblockfile from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | a library with NFS-safe locking functions | https://packages.debian.org/unstable/libs/liblockfile1
- zypper - liblockfile-devel - 1.17-1.12: normalized package name match | openSUSE Tumbleweed package metadata: liblockfile-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for liblockfile | https://github.com/miquels/liblockfile
- zypper - liblockfile1 - 1.17-1.12: normalized package name match | openSUSE Tumbleweed package metadata: liblockfile1 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Library with NFS-safe locking functions | https://github.com/miquels/liblockfile


## Combined YAML source

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