# 使用 Homebrew, apk, chocolatey, dnf, MacPorts, Nix, pacman, zypper, scoop, winget 安装 upx

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

## 安装

```sh
sudo av install brew:upx
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install upx
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install upx
```

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

### Linux

- apk (92%):

```sh
sudo apk add upx
```

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

- dnf (92%):

```sh
sudo dnf install upx
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#upx
```

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

- pacman (92%):

```sh
sudo pacman -S upx
```

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

- zypper (92%):

```sh
sudo zypper install upx
```

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

### Windows

- Chocolatey (92%):

```sh
choco install upx
```

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

- Scoop (92%):

```sh
scoop install main/upx
```

  证据: Scoop official bucket manifest trees: bucket/upx.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id UPX.UPX -e
```

  证据: Windows Package Manager source index: UPX.UPX from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:upx
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/upx>
- **版本:** 5.2.0
- **来源摘要:** Compress/expand executable files
- **主页:** <https://upx.github.io/>
- **仓库:** <https://github.com/upx/upx>
- **上游文档:** <https://upx.github.io/>
- **许可证:** GPL-2.0-or-later
- **源码归档:** <https://github.com/upx/upx/releases/download/v5.2.0/upx-5.2.0-src.tar.xz>
- **最后更新:** 2026-06-08T16:51:09Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- upx (cli)
- upx (别名)

## 构建依赖

- cmake
- ucl

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 5.2.0
- 管理器更新时间: 2026-06-08
- 本地数据: OK
- 上游仓库: https://github.com/upx/upx
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

UPX, the Ultimate Packer for eXecutables, is a long-running executable compressor. Its documentation describes a free, portable, high-performance packer that commonly reduces executable and DLL size while leaving packed programs self-contained.

### 项目历史

The UPX tree traces its lineage to earlier work by Markus Oberhumer and Laszlo Molnar in the 1990s, and the NEWS file marks version 0.05 on 26 May 1998 as the first public beta. Version 1.00 followed on 26 March 2000, after rapid expansion across DOS, Windows, Linux, and other executable formats.

### 采用历史

UPX became a standard tool in release engineering because it targets executable formats rather than source code or archive files. The project moved to GitHub with the 3.92 release in December 2016 and uses the GitHub Pages site as its current home page. The batch input lists wide package-manager coverage across Homebrew, Alpine, Fedora, Arch, MacPorts, Nix, Chocolatey, Scoop, winget, and openSUSE, reflecting cross-platform demand.

### 使用方式

The core package-nerd workflow is direct and scriptable: run `upx` on a binary to pack it, use `-d` to unpack, `-t` to test, and `-l` to inspect compressed size and ratio. The documentation also discusses compression levels, `--best`, `--brute`, LZMA, overlay handling, environment-variable defaults, and format-specific caveats.

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

UPX is significant because it sits at the boundary between packaging, binary distribution, reverse engineering, antivirus analysis, and embedded-size constraints. Maintainers care about its format support, reproducibility hazards, security context warning, unpackability, and the fact that modern operating-system changes can break old packing assumptions.

### 时间线

- 1998: Version 0.05 was the first public beta.
- 2000: Version 1.00 was released.
- 2006: 2.90 beta added LZMA support for many formats.
- 2016: Version 3.92 moved the project to GitHub and the upx.github.io home page.
- 2022: Version 4.0.0 switched to semantic versioning and added easier CMake source builds.
- 2025: Version 5.0.0 introduced major ELF changes including memfd_create support for SELinux enforcing mode.
- 2026: Version 5.2.0 added the cpm86/cmd format.

### Related projects

- The NEWS file says the first public beta drew on experience from DJP, lzop, and mfxpak. UPX also relates to executable-format ecosystems such as ELF, PE, Mach-O, DOS, and firmware/kernel image formats.

### 来源

- <https://github.com/upx/upx/blob/devel/NEWS>
- <https://github.com/upx/upx/blob/devel/README>
- <https://github.com/upx/upx/blob/devel/doc/upx-doc.txt>
- input source_facts.package-manager


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

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

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

- Nix - upx: normalized package name match | nixpkgs package indexes: pkgs/by-name/up/upx/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - upx - 5.2.0-r0: normalized package name match | Alpine Linux edge package indexes: upx from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Ultimate Packer for eXecutables | https://upx.github.io/
- apk - upx-doc - 5.2.0-r0: normalized package name match | Alpine Linux edge package indexes: upx-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Ultimate Packer for eXecutables (documentation) | https://upx.github.io/
- dnf - upx - 5.2.0-2.fc45: normalized package name match | Fedora Rawhide package metadata: upx from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Ultimate Packer for eXecutables | https://github.com/upx/upx
- pacman - upx - 5.2.0-1: normalized package name match | Arch Linux sync databases: upx from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Extendable, high-performance executable packer for several executable formats | https://github.com/upx/upx
- zypper - upx - 5.2.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: upx from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | The Ultimate Packer for eXecutables | https://upx.github.io/
- MacPorts - upx: normalized package name match | MacPorts ports tree: archivers/upx/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - upx: normalized package name match | Chocolatey community package catalog: upx from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','unikey'
- Scoop - main/upx: normalized package name match | Scoop official bucket manifest trees: bucket/upx.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - UPX.UPX: normalized package name match | Windows Package Manager source index: UPX.UPX from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [brotli](https://pkg.so/zh-hans/brew/brotli/) - Shares pkgdb curated category or tags: cli, compression, developer-tools.
- [libarchive](https://pkg.so/zh-hans/brew/libarchive/) - Shares pkgdb curated category or tags: cli, compression, developer-tools.
- [libdeflate](https://pkg.so/zh-hans/brew/libdeflate/) - Shares pkgdb curated category or tags: cli, compression, developer-tools.
- [zip](https://pkg.so/zh-hans/brew/zip/) - Shares pkgdb curated category or tags: cli, compression, developer-tools.
- [pigz](https://pkg.so/zh-hans/brew/pigz/) - Shares pkgdb curated category or tags: cli, compression, developer-tools.
- [zopfli](https://pkg.so/zh-hans/brew/zopfli/) - Shares pkgdb curated category or tags: cli, compression, developer-tools.
- [woff2](https://pkg.so/zh-hans/brew/woff2/) - Shares pkgdb curated category or tags: cli, compression, developer-tools.
- [bloaty](https://pkg.so/zh-hans/brew/bloaty/) - Shares pkgdb curated category or tags: binary-size, cli, developer-tools.
- [cargo-bloat](https://pkg.so/zh-hans/brew/cargo-bloat/) - Local package facts share a topical domain. Shared terms: binary, binary-size, cli, developer, developer-tools.
- [stuffbin](https://pkg.so/zh-hans/brew/stuffbin/) - Local package facts share a topical domain. Shared terms: cli, compress, compression, developer, developer-tools.

## Combined YAML source

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


## 来源

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