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

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

## 安装

```sh
sudo av install brew:ollama
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ollama
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ollama
```

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

### Linux

- apk (92%):

```sh
sudo apk add ollama
```

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

- dnf (92%):

```sh
sudo dnf install ollama
```

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

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

- pacman (92%):

```sh
sudo pacman -S ollama
```

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

- zypper (92%):

```sh
sudo zypper install ollama
```

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

### Windows

- Chocolatey (92%):

```sh
choco install Ollama
```

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

- Scoop (92%):

```sh
scoop install main/ollama
```

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

- winget (92%):

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

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

## 软件包事实

- **软件包键:** brew:ollama
- **软件包管理器:** Homebrew
- **版本:** 0.32.5
- **来源摘要:** Create, run, and share large language models (LLMs)
- **主页:** <https://ollama.com/>
- **仓库:** <https://github.com/ollama/ollama>
- **最后更新:** 2026-07-28T04:19:21Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- ollama (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Ollama is a local model runner, model-management CLI, desktop app, and HTTP API for open-weight language models. It packages the tasks of downloading model artifacts, running inference, serving localhost APIs, creating Modelfile-based variants, and integrating with applications into one developer-facing tool.

### 项目历史

The ollama/ollama repository was created on 2023-06-26, during the fast expansion of open-weight LLM releases after LLaMA-family models made local inference a mainstream developer activity. Written primarily in Go and licensed under MIT, the project made the single command pattern, such as ollama run model-name, central to its identity.

Ollama expanded from a terminal-first model runner into a broader local-AI substrate. Official docs expose a localhost API at port 11434, document generation, chat, embeddings, model pulling, pushing, and listing, and point developers to official Python and JavaScript libraries.

### 采用历史

Ollama's adoption grew with developers' desire to run models without sending prompts, code, or data to hosted APIs. Its model library made open models discoverable by name and tag, while the CLI hid much of the friction around quantized model files, runtime setup, and GPU/CPU execution details.

By 2026-07-01, GitHub repository metadata reported 175,249 stars and 16,789 forks, making Ollama one of the most visible packages in the local-AI tooling wave. The official model library displays pull counts for individual models, and external developer docs such as GitLab's local-model guidance use Ollama as a practical way to serve supported LLMs for development.

### 使用方式

Developers use Ollama to pull and run models such as Llama, Gemma, Qwen, Mistral, DeepSeek, and embedding models; expose them to apps through the REST API; prototype agents and chat tools; and keep code or private documents on local hardware. The API is simple enough to call with curl and broad enough to support libraries, web UIs, IDE integrations, and agent tools.

The package also matters for model packaging. An Ollama model is not only weights: it can include a name, tag, quantization choice, prompt template, parameters, and Modelfile instructions. That makes the package feel closer to Docker-style model distribution than to a bare inference binary.

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

Ollama is significant because it moved local LLMs from specialist inference stacks into normal package-manager territory. Homebrew, Linux package managers, Windows package managers, Docker, language clients, and an HTTP API all point at the same basic workflow: install one executable, pull a named model, and serve or run it.

### 时间线

- 2023-06-26: The ollama/ollama repository was created on GitHub.
- 2024-01-23: Ollama announced initial Python and JavaScript libraries.
- 2024-09-25: Meta announced Llama 3.2 models, including vision models and small edge-oriented text models.
- 2024-11: Ollama documented Llama 3.2 Vision support in Ollama 0.4, including 11B and 90B variants.
- 2026-07-01: GitHub repository metadata reported 175,249 stars, 16,789 forks, Go as the primary language, and MIT licensing.

### Related projects

- Related projects and ecosystems include llama.cpp, Docker, Open WebUI, LangChain-style application frameworks, Hugging Face model distribution, Ollama's Python and JavaScript libraries, and open model families from Meta, Google, Alibaba/Qwen, Mistral, DeepSeek, and others.

### 来源

- <https://ai.meta.com/blog/llama-3-2-connect-2024-vision-edge-mobile-devices/>
- <https://api.github.com/repos/ollama/ollama>
- <https://docs.gitlab.com/development/ai_features/local_models/>
- <https://docs.ollama.com/api/introduction>
- <https://formulae.brew.sh/formula/ollama>
- <https://github.com/ollama/ollama>
- <https://github.com/ollama/ollama/blob/main/docs/api.md>
- <https://ollama.com/>
- <https://ollama.com/blog/llama3.2-vision>
- <https://ollama.com/blog/python-javascript-libraries>
- <https://ollama.com/library>


## 安全说明

formula declares a Homebrew service.

- **Geiger 风险:** orange / 中
- formula declares a Homebrew service

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

- Nix - ollama: normalized package name match | nixpkgs package indexes: pkgs/by-name/ol/ollama/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - ollama - 0.17.7-r1: normalized package name match | Alpine Linux edge package indexes: ollama from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Download and run large language models locally (CPU) | https://github.com/ollama/ollama
- apk - ollama-doc - 0.17.7-r1: normalized package name match | Alpine Linux edge package indexes: ollama-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Download and run large language models locally (CPU) (documentation) | https://github.com/ollama/ollama
- dnf - ollama - 0.24.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: ollama from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Get up and running with OpenAI gpt-oss, DeepSeek-R1, Gemma 3 and other models | https://github.com/ollama/ollama
- dnf - ollama-base - 0.24.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: ollama-base from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | The base ollama | https://github.com/ollama/ollama
- dnf - ollama-rocm - 0.24.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: ollama-rocm from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | The ROCm backend for ollama | https://github.com/ollama/ollama
- dnf - ollama-vulkan - 0.24.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: ollama-vulkan from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | The Vulkan backend for ollama | https://github.com/ollama/ollama
- pacman - ollama - 0.32.5-1: normalized package name match | Arch Linux sync databases: ollama from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Create, run and share large language models (LLMs) | https://github.com/ollama/ollama
- zypper - ollama - 0.30.6-1.4: normalized package name match | openSUSE Tumbleweed package metadata: ollama from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Tool for running AI models on-premise | https://ollama.com
- zypper - ollama-vulkan - 0.30.6-1.3: normalized package name match | openSUSE Tumbleweed package metadata: ollama-vulkan from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Ollama Module using Vulkan | https://ollama.com
- MacPorts - ollama: normalized package name match | MacPorts ports tree: llm/ollama/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - Ollama: normalized package name match | Chocolatey community package catalog: Ollama from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','nvs'
- Scoop - main/ollama: normalized package name match | Scoop official bucket manifest trees: bucket/ollama.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Ollama.Ollama: normalized package name match | Windows Package Manager source index: Ollama.Ollama from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

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