# 安装 postgis

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

## 安装

```sh
sudo av install brew:postgis
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install postgis
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install postgis
```

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

### Linux

- apk (92%):

```sh
sudo apk add postgis
```

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

- Debian apt (92%):

```sh
sudo apt install postgis
```

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

- dnf (92%):

```sh
sudo dnf install postgis
```

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

- pacman (92%):

```sh
sudo pacman -S postgis
```

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

## 软件包事实

- **软件包键:** brew:postgis
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/postgis>
- **版本:** 3.6.3
- **来源摘要:** Adds support for geographic objects to PostgreSQL
- **主页:** <https://postgis.net/>
- **上游文档:** <https://postgis.net/>
- **许可证:** GPL-2.0-or-later
- **源码归档:** <https://download.osgeo.org/postgis/source/postgis-3.6.3.tar.gz>
- **更新:** 2026-05-09T14:00:18Z
- **生成来源:** 2026-05-26T22:45:13+00:00

## 可执行文件

- create_upgrade.pl (cli)
- pgsql2shp (cli)
- pgtopo_export (cli)
- pgtopo_import (cli)
- postgis (cli)
- postgis_restore (cli)
- profile_intersects.pl (cli)
- raster2pgsql (cli)
- shp2pgsql (cli)
- test_estimation.pl (cli)
- test_geography_estimation.pl (cli)
- test_geography_joinestimation.pl (cli)
- test_joinestimation.pl (cli)
- create_upgrade.pl (别名)
- pgsql2shp (别名)
- pgtopo_export (别名)
- pgtopo_import (别名)
- postgis (别名)
- postgis_restore (别名)
- profile_intersects.pl (别名)
- raster2pgsql (别名)
- shp2pgsql (别名)
- test_estimation.pl (别名)
- test_geography_estimation.pl (别名)
- test_geography_joinestimation.pl (别名)
- test_joinestimation.pl (别名)

## 依赖

- gdal
- geos
- gettext
- icu4c@78
- json-c
- libpq
- libxml2
- pcre2
- proj
- protobuf-c
- sfcgal

## 构建依赖

- pkgconf
- postgresql@17
- postgresql@18

## macOS 提供的库

- perl

## 安装行为

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

## 新鲜度

- 页面生成时间: 2026-05-26
- 管理器版本: 3.6.3
- 管理器更新时间: 2026-05-09
- 本地数据: ok
- 上游仓库: https://postgis.net/
- info: Release/tag comparison is only available for GitHub repositories.

## 安全说明

no executable entrypoint in the package index.

- **Geiger 风险:** green / low
- no executable entrypoint in the package index

## 相关链接

- [pcre2](https://www.automicvault.com/pkg/brew/pcre2/) - Runtime dependency declared by Homebrew.
- [gettext](https://www.automicvault.com/pkg/brew/gettext/) - Runtime dependency declared by Homebrew.
- [icu4c@78](https://www.automicvault.com/pkg/brew/icu4c-78/) - Runtime dependency declared by Homebrew.
- [libxml2](https://www.automicvault.com/pkg/brew/libxml2/) - Runtime dependency declared by Homebrew.
- [libpq](https://www.automicvault.com/pkg/brew/libpq/) - Runtime dependency declared by Homebrew.
- [gdal](https://www.automicvault.com/pkg/brew/gdal/) - Runtime dependency declared by Homebrew.
- [proj](https://www.automicvault.com/pkg/brew/proj/) - Runtime dependency declared by Homebrew.
- [json-c](https://www.automicvault.com/pkg/brew/json-c/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [postgresql@17](https://www.automicvault.com/pkg/brew/postgresql-17/) - Build dependency declared by Homebrew.
- [postgresql@18](https://www.automicvault.com/pkg/brew/postgresql-18/) - Build dependency declared by Homebrew.
- [pgrouting](https://www.automicvault.com/pkg/brew/pgrouting/) - Popular package that depends on this formula.
- [osm2pgrouting](https://www.automicvault.com/pkg/brew/osm2pgrouting/) - Popular package that depends on this formula.

## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- package version freshness
- package relationship graph
- cross-ecosystem install command graph
