The problem#
Running Ollama’s official install script failed with curl not found. Following Ubuntu’s suggestion, I installed curl via snap. After that, re-running the Ollama installer failed again — this time with a “directory does not exist” error, and the install wouldn’t complete.
The fix#
Don’t install curl via snap. Once snap’s version of curl is on the PATH, reinstall curl properly instead:
- Update the package list:
sudo apt update - Install curl via apt:This is the right way to do it —
sudo apt install curlaptis Ubuntu’s default package manager. - Verify the install:This should print the installed curl version.
curl --version
To make sure the /usr/bin version of curl takes priority, edit ~/.bashrc and reload it:
- Edit
~/.bashrc:nano ~/.bashrc - Add this
PATHsetting at the end of the file:export PATH=/usr/bin:/usr/local/cuda-12.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin - Save and exit.
- Reload it:
source ~/.bashrc
That resolved the curl-related install failure — from there, the official Ollama installer ran through cleanly.
