ollama formula missing llama-server (should depend on llama.cpp)
## What happened
After installing `ollama` via Homebrew on macOS (Apple Silicon, Sequoia 15.7), any model that requires `llama-server` (GGUF models, embedding models like `nomic-embed-text`) fails with:
```
error starting llama-server: llama-server binary not found (checked: /opt/homebrew/Cellar/ollama/0.30.0/libexec/lib/ollama/llama-server, /opt/homebrew/Cellar/ollama/0.30.0/libexec/llama-server, /opt/homebrew/Cellar/ollama/0.30.0/lib/ollama/llama-server, ...)
```
MLX models (e.g. `gemma4:26b-mlx`) work fine because they use the MLX runner which IS bundled in the Homebrew bottle. Only `llama-server` (the llama.cpp inference runner) is missing.
## Root cause
The official Ollama macOS app bundles `llama-server` alongside the binary at `Ollama.app/Contents/Resources/llama-server`. The Homebrew formula only ships the `ollama` binary and MLX libraries — it does not include `llama-server`.
Ollama's `FindLlamaServer()` (see `discover/llama_server.go` and `llm/llama_binary.go` in the ollama repo) searches hardcoded relative paths next to its own binary. It does **not** check `$PATH` or any environment variable for the runner binary. The `OLLAMA_LIBRARY_PATH` and `DYLD_LIBRARY_PATH` env vars are for shared libraries (GPU backends), not for the `llama-server` executable.
This means `brew install ollama` produces a partially broken install: MLX models work, but any model requiring llama.cpp inference fails silently.
## Current workaround
```bash
brew install llama.cpp
ln -sf /opt/homebrew/bin/llama-server /opt/homebrew/Cellar/ollama/0.30.0/libexec/lib/ollama/llama-server
```
The symlink must be recreated after `brew upgrade ollama` changes the Cellar version path.
## Proposed fix
Add `depends_on "llama.cpp"` to the ollama formula and create the symlink as part of the install process, so that `brew install ollama` works out of the box for all model types — not just MLX ones.
Alternatively, the ollama formula could include `llama-server` in its bottle directly (as the official app does), but depending on the already-packaged `llama.cpp` avoids duplication and keeps both in sync via Homebrew.
## Related
- ollama/ollama#16417 — same error reported from the Ollama side
- This affects all Homebrew ollama installs on macOS where users try to run GGUF or embedding models
0 条评论