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

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

## 安装

```sh
sudo av install brew:mapserver
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mapserver
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mapserver
```

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

### Linux

- apk (92%):

```sh
sudo apk add mapserver
```

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

- dnf (92%):

```sh
sudo dnf install mapserver
```

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

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

- zypper (92%):

```sh
sudo zypper install mapserver
```

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

- Debian apt (92%):

```sh
sudo apt install cgi-mapserver
```

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

## 软件包事实

- **软件包键:** brew:mapserver
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/mapserver>
- **版本:** 8.6.5
- **来源摘要:** Publish spatial data and interactive mapping apps to the web
- **主页:** <https://mapserver.org/>
- **上游文档:** <https://mapserver.org/>
- **许可证:** MIT
- **源码归档:** <https://download.osgeo.org/mapserver/mapserver-8.6.5.tar.gz>
- **最后更新:** 2026-07-12T05:27:39Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- coshp (cli)
- legend (cli)
- map2img (cli)
- mapserv (cli)
- msencrypt (cli)
- scalebar (cli)
- shptree (cli)
- shptreetst (cli)
- shptreevis (cli)
- sortshp (cli)
- tile4ms (cli)
- coshp (别名)
- legend (别名)
- map2img (别名)
- mapserv (别名)
- msencrypt (别名)
- scalebar (别名)
- shptree (别名)
- shptreetst (别名)
- shptreevis (别名)
- sortshp (别名)
- tile4ms (别名)

## 依赖

- cairo
- fcgi
- freetype
- gdal
- geos
- giflib
- jpeg-turbo
- libpng
- libpq
- libxml2
- pcre2
- proj
- protobuf-c
- python@3.14

## 构建依赖

- cmake
- pkgconf
- swig

## macOS 提供的库

- curl

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 8.6.5
- 管理器更新时间: 2026-07-12
- 本地数据: OK
- 上游仓库: https://mapserver.org/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

MapServer is a long-running open-source web mapping engine for publishing spatial data and interactive mapping applications, administered in the OSGeo ecosystem and configured primarily through .map files.

### 项目历史

OSGeo's project page says MapServer was originally developed in the mid-1990s at the University of Minnesota and is known as a fast open-source platform for publishing spatial data and interactive mapping applications to the web. The official GitHub repository credits Stephen Lime as the original author and notes major NASA funding through cooperative agreements with the University of Minnesota Department of Forest Resources.

MapServer predates many modern web-map stacks. It began as a C-based CGI-era map engine and grew into a standards-heavy server that can publish raster and vector data through OGC protocols. OSGeo lists support for GDAL/OGR data access, PROJ projections, WMS, WFS, WCS, SOS, GML, GeoJSON, KML, SLD, and related web mapping standards.

The current GitHub repository was created in April 2012, reflecting migration of an older project into GitHub-hosted development rather than the beginning of the software itself. Releases in the 8.6 line were still being published in 2025 and 2026, showing unusually long continuity for a web mapping engine.

### 采用历史

MapServer's adoption is institutional and infrastructure-oriented: public agencies, universities, and GIS teams use it to publish spatial services rather than to run a desktop UI. OSGeo says it is supported by a diverse group of organizations and administered by the MapServer Project Steering Committee.

The input package metadata lists MapServer packages across Homebrew, Debian, Ubuntu, Fedora, Alpine, MacPorts, Nix, and openSUSE-style packaging. That broad packaging footprint is typical for mature GIS infrastructure with native dependencies and server deployment needs.

### 使用方式

Users configure MapServer with mapfiles, conventionally named with a .map extension, then run tools such as mapserv, map2img, shp utilities, legend, scalebar, and related helpers. OSGeo's feature list specifically notes that MapServer is easily configured through .map files.

Package users care about both the CGI/server binary and the helper utilities. mapserv is the recognizable runtime, but tools such as map2img and shptree make it possible to test rendering and prepare data from the command line.

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

MapServer is package-nerd important because it is old, native, standards-heavy GIS infrastructure that still ships. It pulls together C, GDAL/OGR, PROJ, image libraries, optional scripting environments, and web-server deployment conventions.

It is also historically important as one of the classic open-source web mapping engines, surviving the transition from CGI map servers to modern OGC and tile-oriented web GIS stacks.

### 时间线

- Mid-1990s: Project originated at the University of Minnesota.
- 1990s: NASA funding supported development through University of Minnesota forestry-related work.
- 2012: Current GitHub repository created.
- 2025: MapServer 8.6.0 released.
- 2026: MapServer 8.6.4 released.

### Related projects

- MapCache is listed by OSGeo as a MapServer sub-project for tile caching.
- GDAL/OGR and PROJ are central supporting geospatial libraries.
- GeoServer, MapGuide Open Source, and deegree are listed by OSGeo as similar web mapping projects.

### 来源

- <https://api.github.com/repos/MapServer/MapServer>
- <https://api.github.com/repos/MapServer/MapServer/releases?per_page=5>
- <https://github.com/MapServer/MapServer>
- <https://www.osgeo.org/projects/mapserver/>
- source_facts.executables
- source_facts.package-manager


## 安全说明

没有找到 mapserver 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: *.map
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mapserver
- **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

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

- Debian apt - cgi-mapserver - 8.4.0-4+deb13u2: normalized package name match | Debian stable package indexes: cgi-mapserver from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | CGI executable for MapServer | https://mapserver.org
- Debian apt - libmapscript-java - 8.4.0-4+deb13u2: normalized package name match | Debian stable package indexes: libmapscript-java from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Java library for MapServer | https://mapserver.org
- Debian apt - libmapscript-perl - 8.4.0-4+deb13u2: normalized package name match | Debian stable package indexes: libmapscript-perl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Perl MapServer module | https://mapserver.org
- Debian apt - libmapserver-dev - 8.4.0-4+deb13u2: normalized package name match | Debian stable package indexes: libmapserver-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Shared library development files for MapServer | https://mapserver.org
- Debian apt - libmapserver2t64 - 8.4.0-4+deb13u2: normalized package name match | Debian stable package indexes: libmapserver2t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Shared library for MapServer | https://mapserver.org
- Debian apt - mapserver-bin - 8.4.0-4+deb13u2: normalized package name match | Debian stable package indexes: mapserver-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | MapServer utilities | https://mapserver.org
- Debian apt - mapserver-doc - 8.4.0-4+deb13u2: normalized package name match | Debian stable package indexes: mapserver-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | documentation for MapServer | https://mapserver.org
- Debian apt - php-mapscript-ng - 8.4.0-4+deb13u2: normalized package name match | Debian stable package indexes: php-mapscript-ng from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | PHP MapServer module (SWIG) | https://mapserver.org
- Debian apt - python3-mapscript - 8.4.0-4+deb13u2: normalized package name match | Debian stable package indexes: python3-mapscript from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Python library for MapServer | https://mapserver.org
- Nix - mapserver: normalized package name match | nixpkgs package indexes: pkgs/by-name/ma/mapserver/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - cgi-mapserver - 8.0.1-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: cgi-mapserver from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | CGI executable for MapServer | https://mapserver.org
- Ubuntu apt - libmapscript-java - 8.0.1-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libmapscript-java from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Java library for MapServer | https://mapserver.org
- Ubuntu apt - libmapscript-perl - 8.0.1-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libmapscript-perl from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Perl MapServer module | https://mapserver.org
- Ubuntu apt - libmapserver-dev - 8.0.1-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libmapserver-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Shared library development files for MapServer | https://mapserver.org
- Ubuntu apt - libmapserver2t64 - 8.0.1-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libmapserver2t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Shared library for MapServer | https://mapserver.org
- Ubuntu apt - mapserver-bin - 8.0.1-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: mapserver-bin from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | MapServer utilities | https://mapserver.org


## 相关链接

- [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.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Database and data packages](https://pkg.so/zh-hans/database-data-tools/) - Matched database, SQL, migration, or data-store metadata.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [pcre2](https://pkg.so/zh-hans/brew/pcre2/) - Runtime dependency declared by Homebrew.
- [libpng](https://pkg.so/zh-hans/brew/libpng/) - Runtime dependency declared by Homebrew.
- [jpeg-turbo](https://pkg.so/zh-hans/brew/jpeg-turbo/) - Runtime dependency declared by Homebrew.
- [freetype](https://pkg.so/zh-hans/brew/freetype/) - Runtime dependency declared by Homebrew.
- [giflib](https://pkg.so/zh-hans/brew/giflib/) - Runtime dependency declared by Homebrew.
- [cairo](https://pkg.so/zh-hans/brew/cairo/) - Runtime dependency declared by Homebrew.
- [libxml2](https://pkg.so/zh-hans/brew/libxml2/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [swig](https://pkg.so/zh-hans/brew/swig/) - Build dependency declared by Homebrew.
- [libgeotiff](https://pkg.so/zh-hans/brew/libgeotiff/) - Shares pkgdb curated category or tags: cli, data, geospatial, gis.
- [postgis](https://pkg.so/zh-hans/brew/postgis/) - Shares pkgdb curated category or tags: cli, data, geospatial, gis.
- [mapnik](https://pkg.so/zh-hans/brew/mapnik/) - Shares pkgdb curated category or tags: cli, data, geospatial, gis.
- [shapelib](https://pkg.so/zh-hans/brew/shapelib/) - Shares pkgdb curated category or tags: cli, data, geospatial, gis.
- [mapproxy](https://pkg.so/zh-hans/brew/mapproxy/) - Shares pkgdb curated category or tags: cli, data, geospatial, gis.
- [pdal](https://pkg.so/zh-hans/brew/pdal/) - Shares pkgdb curated category or tags: cli, data, geospatial.
- [osmium-tool](https://pkg.so/zh-hans/brew/osmium-tool/) - Shares pkgdb curated category or tags: cli, data, geospatial.
- [pmtiles](https://pkg.so/zh-hans/brew/pmtiles/) - Shares pkgdb curated category or tags: cli, data, geospatial.
- [librasterlite2](https://pkg.so/zh-hans/brew/librasterlite2/) - Local package facts share a topical domain. Shared terms: cairo, cli, data, freetype, geos.

## Combined YAML source

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


## 来源

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