[GH-ISSUE #11980] Avoidable fatal failure of optional install section on usermod -a -G ollama $(whoami) #54467

Open
opened 2026-04-29 06:02:41 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @hoxell on GitHub (Aug 20, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11980

What is the issue?

When running the installer script on a Linux machine under a non-local user, $SUDO usermod -a -G ollama $(whoami) fails, causing the install script to skip the rest of the optional section (e.g., skipping setting up the systemd service). It still executes the install_success message, though, since the EXIT trap is never reset:

>>> The Ollama API is now available at 127.0.0.1:11434.
>>> Install complete. Run "ollama" from the command line.

Naturally, there's no server listening on 11434 since it was never actually configured nor started:

$ ss -tlpn sport 11434
State                                       Recv-Q                                      Send-Q                                                                           Local Address:Port                                                                              Peer Address:Port                                      Process
$ 

See https://github.com/ollama/ollama/pull/11643 for a suggested fix, making the usermod optional, logging only a warning on failure.

Relevant log output

>>> Cleaning up old version at /usr/local/lib/ollama
>>> Installing ollama to /usr/local
>>> Downloading Linux amd64 bundle
######################################################################## 100.0%
>>> Adding ollama user to render group...
>>> Adding ollama user to video group...
>>> Adding current user to ollama group...
usermod: user 'xxxxxxxxxx' does not exist
>>> The Ollama API is now available at 127.0.0.1:11434.
>>> Install complete. Run "ollama" from the command line.

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.11.5

Originally created by @hoxell on GitHub (Aug 20, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11980 ### What is the issue? When running the installer script on a Linux machine under a non-local user, `$SUDO usermod -a -G ollama $(whoami)` fails, causing the install script to skip the rest of the optional section (e.g., skipping setting up the systemd service). It still executes the `install_success` message, though, since the EXIT trap is never reset: ``` >>> The Ollama API is now available at 127.0.0.1:11434. >>> Install complete. Run "ollama" from the command line. ``` Naturally, there's no server listening on 11434 since it was never actually configured nor started: ``` $ ss -tlpn sport 11434 State Recv-Q Send-Q Local Address:Port Peer Address:Port Process $ ``` See https://github.com/ollama/ollama/pull/11643 for a suggested fix, making the `usermod` optional, logging only a warning on failure. ### Relevant log output ```shell >>> Cleaning up old version at /usr/local/lib/ollama >>> Installing ollama to /usr/local >>> Downloading Linux amd64 bundle ######################################################################## 100.0% >>> Adding ollama user to render group... >>> Adding ollama user to video group... >>> Adding current user to ollama group... usermod: user 'xxxxxxxxxx' does not exist >>> The Ollama API is now available at 127.0.0.1:11434. >>> Install complete. Run "ollama" from the command line. ``` ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.11.5
GiteaMirror added the bug label 2026-04-29 06:02:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#54467