Can't install ollama

I entered the install command that appears on the ollama website, yet I get an error.

davidct@fedora:~$ curl -fsSL https://ollama.com/install.sh | sh
>>> Installing ollama to /usr/local

Confiem que heu rebut la llissó habitual de l'Administrador del
Sistema. Generalment es resumeix en aquestes tres coses:

    #1) Respecteu la privacitat dels altres.
    #2) Penseu abans d'escriure.
    #3) Tenir molt de poder està associat amb tenir molta responsabilitat.

For security reasons, the password you type will not be visible.

[sudo] contrasenya per a davidct: 
>>> Downloading Linux amd64 bundle
######################################################################## 100.0%
>>> Creating ollama user...
>>> Adding ollama user to render group...
>>> Adding ollama user to video group...
>>> Adding current user to ollama group...
>>> Creating ollama systemd service...
>>> Enabling and starting ollama service...
Created symlink '/etc/systemd/system/default.target.wants/ollama.service' → '/etc/systemd/system/ollama.service'.
>>> Installing NVIDIA repository...
Unknown argument "--add-repo" for command "config-manager". Afegiu '--help' per obtenir més informació sobre els arguments.

Any idea about how could I fix it?

Installing software in any location except the users home directory will require the use of sudo (which is apparently used within the install.sh script).

That script apparently uses a command structure that is not supported by fedora.
There is no command ``config-manager` in fedora so the non-supported command fails.

If you need the nvidia drivers then the instructions to install them are located at

You can install Ollama from Fedora repo

sudo dnf install ollama
2 Likes

config-manager is part of dnf, but how dnf works to add repositories now has changed from version 4 to version 5. So adding a repo is sudo dnf config-manager addrepo --from-repofile=repository.

At line 254 in the install script, it appears to be incorrect.

So taking the above, the correct command on line 254 should be $SUDO $PACKAGE_MANAGER config-manager add-repo --from-repofile=https://developer.download.nvidia.com/compute/cuda/repos/$1$2/$(uname -m | sed -e 's/aarch64/sbsa/')/cuda-$1$2.repo

The install.sh doesn’t seem to be very actively maintained.

A couple of issues have been raised in Github (7869, 9865), and a couple of pull requests have been submitted but not merged (8691, 9866).