[GH-ISSUE #15521] macOS: GUI app fails to detect ollama in user's shell PATH, always prompts for admin password to install CLI symlink #56434

Open
opened 2026-04-29 10:49:18 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @LH-and-FPGA on GitHub (Apr 12, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15521

Feature Request

Currently, the macOS GUI app always prompts for an admin password to create a symlink at /usr/local/bin/ollama, with no way to skip or customize this behavior. Users who have already made ollama accessible through their shell PATH configuration (e.g., in .zshrc) are still prompted for admin credentials on every launch.

Motivation

The current installSymlink() logic uses exec.LookPath("ollama") to check if the CLI is available. On macOS, GUI apps receive their environment from launchd, not from shell configuration files, so this check will never find an ollama configured via .zshrc/.bashrc/.bash_profile. The app then unconditionally triggers an AuthorizationExecuteWithPrivileges prompt to create the symlink.

This creates friction for several user groups:

  • Users who manage their own PATH — adding the app bundle's Contents/Resources directory to $PATH in .zshrc is a perfectly valid approach, but the app cannot detect it
  • Security-conscious users who prefer not to grant admin privileges to applications (#851)
  • Managed/enterprise macOS accounts that lack admin credentials entirely (#12718)
  • Homebrew users whose ollama binary may live at /opt/homebrew/bin/ollama (#11336)
  • Users who install to ~/Applications rather than /Applications (#11490)

It's also worth noting that the Linux install script (scripts/install.sh) dynamically discovers the appropriate bin directory by scanning the user's PATH, while the macOS app hardcodes /usr/local/bin with no fallback or override.

Proposed Behavior

When exec.LookPath fails to find ollama in the GUI app's own PATH, the app should additionally check the user's login shell PATH (e.g., via $SHELL -l -c "command -v ollama") before falling back to the admin password prompt. If ollama is already reachable through the user's shell, skip the symlink installation.

Originally created by @LH-and-FPGA on GitHub (Apr 12, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15521 ## Feature Request Currently, the macOS GUI app always prompts for an admin password to create a symlink at `/usr/local/bin/ollama`, with no way to skip or customize this behavior. Users who have already made `ollama` accessible through their shell PATH configuration (e.g., in `.zshrc`) are still prompted for admin credentials on every launch. ## Motivation The current `installSymlink()` logic uses `exec.LookPath("ollama")` to check if the CLI is available. On macOS, GUI apps receive their environment from `launchd`, not from shell configuration files, so this check will never find an `ollama` configured via `.zshrc`/`.bashrc`/`.bash_profile`. The app then unconditionally triggers an `AuthorizationExecuteWithPrivileges` prompt to create the symlink. This creates friction for several user groups: - **Users who manage their own PATH** — adding the app bundle's `Contents/Resources` directory to `$PATH` in `.zshrc` is a perfectly valid approach, but the app cannot detect it - **Security-conscious users** who prefer not to grant admin privileges to applications (#851) - **Managed/enterprise macOS accounts** that lack admin credentials entirely (#12718) - **Homebrew users** whose `ollama` binary may live at `/opt/homebrew/bin/ollama` (#11336) - **Users who install to `~/Applications`** rather than `/Applications` (#11490) It's also worth noting that the Linux install script (`scripts/install.sh`) dynamically discovers the appropriate bin directory by scanning the user's PATH, while the macOS app hardcodes `/usr/local/bin` with no fallback or override. ## Proposed Behavior When `exec.LookPath` fails to find `ollama` in the GUI app's own PATH, the app should additionally check the user's login shell PATH (e.g., via `$SHELL -l -c "command -v ollama"`) before falling back to the admin password prompt. If `ollama` is already reachable through the user's shell, skip the symlink installation.
GiteaMirror added the feature request label 2026-04-29 10:49:18 -05:00
Author
Owner

@PureBlissAK commented on GitHub (Apr 18, 2026):

🤖 Automated Triage & Analysis Report

Issue: #15521
Analyzed: 2026-04-18T18:21:22.207465

Analysis

  • Type: unknown
  • Severity: medium
  • Components: unknown

Implementation Plan

  • Effort: medium
  • Steps:

This issue has been triaged and marked for implementation.

<!-- gh-comment-id:4274308194 --> @PureBlissAK commented on GitHub (Apr 18, 2026): <!-- ollama-issue-orchestrator:v1 issue:15521 --> ## 🤖 Automated Triage & Analysis Report **Issue**: #15521 **Analyzed**: 2026-04-18T18:21:22.207465 ### Analysis - **Type**: unknown - **Severity**: medium - **Components**: unknown ### Implementation Plan - **Effort**: medium - **Steps**: *This issue has been triaged and marked for implementation.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#56434