[GH-ISSUE #11873] installer almost nuked my system #69940

Open
opened 2026-05-04 19:49:51 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @zlice on GitHub (Aug 12, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11873

Originally assigned to: @pdevine on GitHub.

What is the issue?

https://github.com/ollama/ollama/?tab=readme-ov-file#linux

seemingly handles path incorrectly and completely removed my /bin and /lib directories in void linux. luckily, they are symlinks to /usr/bin and /usr/lib. i changed my PATH only points to /bin because of the symlinks causing duplicates. this probably lead to OLLAMA_INSTALL_DIR being empty or something?

edit: don't see why this doesnt try to install to /opt

Relevant log output


OS

Linux

GPU

No response

CPU

No response

Ollama version

na

Originally created by @zlice on GitHub (Aug 12, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11873 Originally assigned to: @pdevine on GitHub. ### What is the issue? https://github.com/ollama/ollama/?tab=readme-ov-file#linux seemingly handles path incorrectly and completely removed my `/bin` and `/lib` directories in void linux. luckily, they are symlinks to `/usr/bin` and `/usr/lib`. i changed my PATH only points to `/bin` because of the symlinks causing duplicates. this probably lead to OLLAMA_INSTALL_DIR being empty or something? edit: don't see why this doesnt try to install to `/opt` ### Relevant log output ```shell ``` ### OS Linux ### GPU _No response_ ### CPU _No response_ ### Ollama version na
GiteaMirror added the bugneeds more info labels 2026-05-04 19:49:51 -05:00
Author
Owner

@zlice commented on GitHub (Aug 12, 2025):

this apparently has nothing to do with my PATH or (may be path still? idk) my distro.

tried debian chroot and hit the same thing. bye bye /bin and ln not found, rm not found

<!-- gh-comment-id:3181225913 --> @zlice commented on GitHub (Aug 12, 2025): this apparently has nothing to do with ~~my PATH or~~ (may be path still? idk) my distro. tried debian chroot and hit the same thing. bye bye `/bin` and `ln not found`, `rm not found`
Author
Owner

@zlice commented on GitHub (Aug 12, 2025):

can confirm. PATH=/bin:/usr/bin will install to /usr/bin/ollama and /usr/lib/ollama without nuking things.

should check for PATH and symlinks. but would probably be best to just put in /opt imo

<!-- gh-comment-id:3181252104 --> @zlice commented on GitHub (Aug 12, 2025): can confirm. `PATH=/bin:/usr/bin` will install to `/usr/bin/ollama` and `/usr/lib/ollama` without nuking things. should check for PATH and symlinks. but would probably be best to just put in `/opt` imo
Author
Owner

@pdevine commented on GitHub (Aug 13, 2025):

The only things in the installer that would have removed something are this line which only removes OLLAMA_INSTALL_DIR/lib/ollama, and in this line which cleans up a tempdir.

Do you have an log files?

If you want to install into /opt I think you can change the this line to just put /opt at the beginning.

<!-- gh-comment-id:3181794329 --> @pdevine commented on GitHub (Aug 13, 2025): The only things in the installer that would have removed something are this [line](https://github.com/ollama/ollama/blob/main/scripts/install.sh#L76) which only removes `OLLAMA_INSTALL_DIR/lib/ollama`, and in this [line](https://github.com/ollama/ollama/blob/main/scripts/install.sh#L15) which cleans up a tempdir. Do you have an log files? If you want to install into `/opt` I think you can change the this [line](https://github.com/ollama/ollama/blob/main/scripts/install.sh#L69) to just put `/opt` at the beginning.
Author
Owner

@zlice commented on GitHub (Aug 13, 2025):

no log. not sure there is anything, as everything quits working once the /bin symlink is removed.

<!-- gh-comment-id:3183884319 --> @zlice commented on GitHub (Aug 13, 2025): no log. not sure there is anything, as everything quits working once the `/bin` symlink is removed.
Author
Owner

@pdevine commented on GitHub (Aug 13, 2025):

I went ahead and attempted to install void linux, but apparently you can't run the installer on aarch64, so I'm having problems duplicating the issue. Do you want to try adding /opt into the install script?

<!-- gh-comment-id:3186004677 --> @pdevine commented on GitHub (Aug 13, 2025): I went ahead and attempted to install void linux, but apparently you can't run the installer on `aarch64`, so I'm having problems duplicating the issue. Do you want to try adding `/opt` into the install script?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#69940