Cant push in ollama

123 Views Asked by At

Getting the following error in ollama:

Error: stat /usr/share/ollama/.ollama/models/manifests/registry.ollama.ai/murtsu/marko/latest: no such file or directory

What to do? The marko model runs fine. I don't know what to do. I'm used to linux but shouldn't this work?

1

There are 1 best solutions below

0
On

U can literally specify the OLLAMA_MODELS env variable when running ollama. Let's clue in.

  1. Make sure where u wanna put the models at or where does the ollama put the models at. For a Linux user, there are often two paths u might check out:

    (1)~/.ollama/models (2)/usr/share/ollama/.ollama

    Find where your models at, including the "marko".

  2. Specify the model path and finish all the path-related errors, including the problem u facing and other alike problems (e.g. models disappear in list after restarting ollama).

    sudo systemctl edit ollama.service
    

    U open it, write the following text in the Nano window:

    [Service]

    Environment="OLLAMA_MODELS=/usr/share/ollama/.ollama/models"

    or

    [Service]

    Environment="OLLAMA_MODELS=/home/{your_user_name}/.ollama/models"

    Then save it by CTRL+O + CTRL+X.

  3. Restart ollama by sudo systemctl restart ollama.service or ollama serve.

I hope it works for u since it worked for me.