[GH-ISSUE #14998] install.sh returns "Install complete" despite sudo timeout / failure (False Positive) #56152

Closed
opened 2026-04-29 10:19:31 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Lux666-curl on GitHub (Mar 21, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/14998

What is the issue?

While installing Ollama on Ubuntu 24.04 (using sudo-rs), the installation script's sudo authentication timed out during the "Creating ollama user" stage.

Instead of exiting with an error code, the script continued to the next steps and printed >>> Install complete. Run "ollama" from the command line., even though the environment was not properly configured (service wasn't created and user wasn't added).

Relevant log output

Steps to Reproduce:
Run the official install command: curl -fsSL https://ollama.com/install.sh | sh

When prompted for a password, wait for the sudo timeout (or enter an incorrect password).

Observe that the script ignores the failure of the sudo command and concludes with a success message.

Expected Behavior:
The script should check the exit status ($?) of each critical command. If a command fails (especially user creation or service setup), the script should terminate immediately with an error message and a non-zero exit code.

Actual Behavior:
The script suppresses or ignores failures during the sudo execution block and reports a successful installation.

OS

Linux

GPU

Nvidia

CPU

Intel, AMD

Ollama version

0.18.2

Originally created by @Lux666-curl on GitHub (Mar 21, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/14998 ### What is the issue? While installing Ollama on Ubuntu 24.04 (using sudo-rs), the installation script's sudo authentication timed out during the "Creating ollama user" stage. Instead of exiting with an error code, the script continued to the next steps and printed >>> Install complete. Run "ollama" from the command line., even though the environment was not properly configured (service wasn't created and user wasn't added). ### Relevant log output ```shell Steps to Reproduce: Run the official install command: curl -fsSL https://ollama.com/install.sh | sh When prompted for a password, wait for the sudo timeout (or enter an incorrect password). Observe that the script ignores the failure of the sudo command and concludes with a success message. Expected Behavior: The script should check the exit status ($?) of each critical command. If a command fails (especially user creation or service setup), the script should terminate immediately with an error message and a non-zero exit code. Actual Behavior: The script suppresses or ignores failures during the sudo execution block and reports a successful installation. ``` ### OS Linux ### GPU Nvidia ### CPU Intel, AMD ### Ollama version 0.18.2
GiteaMirror added the bug label 2026-04-29 10:19:31 -05:00
Author
Owner

@rick-github commented on GitHub (Mar 22, 2026):

This would seem to be a bug in sudo-rs. The start of the script sets the -e flag, and any commands that return an error should result in the script exiting. If the script does not exit when you use sudo-rs, then it would mean that the sudo invocation is not returning an error code when it fails. If I configure a password timeout with standard sudo, the script stops if a password is not entered:

$ curl -fsSL https://ollama.com/install.sh | sh
>>> Cleaning up old version at /usr/local/lib/ollama
[sudo] password for rick: 
sudo: timed out reading password
sudo: a password is required
<!-- gh-comment-id:4106383240 --> @rick-github commented on GitHub (Mar 22, 2026): This would seem to be a bug in `sudo-rs`. The start of the script [sets](https://github.com/ollama/ollama/blob/22c2bdbd8add79c6fca2eb2538ab36fcd4a9ca48/scripts/install.sh#L9) the `-e` flag, and any commands that return an error should result in the script exiting. If the script does not exit when you use `sudo-rs`, then it would mean that the `sudo` invocation is not returning an error code when it fails. If I configure a password timeout with standard `sudo`, the script stops if a password is not entered: ```console $ curl -fsSL https://ollama.com/install.sh | sh >>> Cleaning up old version at /usr/local/lib/ollama [sudo] password for rick: sudo: timed out reading password sudo: a password is required ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#56152