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

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

## 安装

```sh
sudo av install brew:libfaketime
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libfaketime
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libfaketime
```

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

### Linux

- apk (92%):

```sh
sudo apk add libfaketime
```

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

- Debian apt (92%):

```sh
sudo apt install libfaketime
```

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

- dnf (92%):

```sh
sudo dnf install libfaketime
```

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

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

- pacman (92%):

```sh
sudo pacman -S libfaketime
```

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

- zypper (92%):

```sh
sudo zypper install libfaketime
```

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

## 软件包事实

- **软件包键:** brew:libfaketime
- **软件包管理器:** Homebrew
- **版本:** 0.9.12
- **来源摘要:** Report faked system time to programs
- **主页:** <https://github.com/wolfcw/libfaketime>
- **仓库:** <https://github.com/wolfcw/libfaketime>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- faketime (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

libfaketime is a preload-based library and faketime wrapper that makes selected programs see modified dates and times without changing the system clock. It is packaged as a developer/testing utility because it exercises time-sensitive code at the process boundary.

### 项目历史

The project's NEWS file tracks changes back to version 0.1, beginning with fixes around time(NULL) and growing through clock_gettime interception, wrapper scripts, fractional offsets, speed changes, system-wide faketimerc files, macOS support, pthread-aware builds, deterministic time, and deterministic getrandom support.

Starting with libfaketime 0.9.5, the developer README says development and issue handling moved completely to GitHub, with official releases tagged there.

### 采用历史

Package managers adopted libfaketime because it solves a practical test problem: run one process under a fake clock while leaving the host clock alone. The README names deterministic builds, expired-certificate debugging, and year-2038 testing as intended use cases.

### 使用方式

Most users run the faketime wrapper or set preload-related environment variables directly. The README also documents important limits: statically linked and setuid binaries are not covered by the preload mechanism, some Java/JVM cases need monotonic-clock care, and programs that dynamically load timing libraries can bypass interception.

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

libfaketime is beloved packaging glue because it gives build systems and test suites a cheap fake clock without patching application code. That makes it useful for reproducible builds, certificate-expiry tests, date rollover tests, and awkward legacy software checks.

### 时间线

- 0.1: NEWS records initial fixes around time(NULL).
- 0.2: NEWS records clock_gettime interception.
- 0.7: NEWS records the wrapper shell script and man page.
- 0.9.5: Developer README records GitHub as the development and issue-handling home.
- 2025-06: README identifies version 0.9.12 and NEWS records improved macOS compatibility.

### Related projects

- Related mechanisms include LD_PRELOAD, dyld interposing on macOS, faketimerc files, reproducible-build tooling, test harnesses, and language wrappers around libfaketime.

### 来源

- <https://formulae.brew.sh/formula/libfaketime>
- <https://github.com/wolfcw/libfaketime>
- <https://raw.githubusercontent.com/wolfcw/libfaketime/master/NEWS>
- <https://raw.githubusercontent.com/wolfcw/libfaketime/master/README>
- <https://raw.githubusercontent.com/wolfcw/libfaketime/master/README.developers>


## 安全说明

library-like package without higher-risk signals.

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

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

- Debian apt - libfaketime - 0.9.10+2024-06-05+gba9ed5b2-0.6: normalized package name match | Debian stable package indexes: libfaketime from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Report faked system time to programs (preload library) | https://github.com/wolfcw/libfaketime
- Nix - libfaketime: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libfaketime/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libfaketime - 0.9.10-2.1: normalized package name match | Ubuntu 24.04 LTS package indexes: libfaketime from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Report faked system time to programs (preload library) | https://github.com/wolfcw/libfaketime
- apk - libfaketime - 0.9.12-r0: normalized package name match | Alpine Linux edge package indexes: libfaketime from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | intercept system calls related to time and return user-defined values | https://github.com/wolfcw/libfaketime
- apk - libfaketime-doc - 0.9.12-r0: normalized package name match | Alpine Linux edge package indexes: libfaketime-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | intercept system calls related to time and return user-defined values (documentation) | https://github.com/wolfcw/libfaketime
- dnf - libfaketime - 0.9.12-14.fc45: normalized package name match | Fedora Rawhide package metadata: libfaketime from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Manipulate system time per process for testing purposes | https://github.com/wolfcw/libfaketime
- pacman - libfaketime - 0.9.12-1: normalized package name match | Arch Linux sync databases: libfaketime from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Report fake dates and times to programs without having to change the system-wide time. | https://github.com/wolfcw/libfaketime
- zypper - libfaketime - 0.9.12-2.3: normalized package name match | openSUSE Tumbleweed package metadata: libfaketime from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | FakeTime Preload Library | https://github.com/wolfcw/libfaketime
- MacPorts - libfaketime: normalized package name match | MacPorts ports tree: sysutils/libfaketime/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Debian apt - faketime - 0.9.10+2024-06-05+gba9ed5b2-0.6: installed executable or alias match | Debian stable package indexes: faketime from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Report faked system time to programs (command-line tool) | https://github.com/wolfcw/libfaketime
- Ubuntu apt - faketime - 0.9.10-2.1: installed executable or alias match | Ubuntu 24.04 LTS package indexes: faketime from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Report faked system time to programs (command-line tool) | https://github.com/wolfcw/libfaketime


## Combined YAML source

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