[GH-ISSUE #5330] Ollama installation on WSL (Ubuntu 24.04) fails with certificate problem #29096

Open
opened 2026-04-22 07:44:48 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @tagwato on GitHub (Jun 27, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5330

Hi,
Could not install Ollama.

Operating system:

  • Windos Subsystem for Linux (WSL2)
  • Installed distro: Ubuntu 24.04)

Command executed, as explained in https://github.com/ollama/ollama
curl -fsSL https://ollama.com/install.sh | sh

Gives the following output, with error about a certificate problem.

user@WK-325467:~$ curl -fsSL https://ollama.com/install.sh | sh

Downloading ollama...
######################################################################## 100.0%#=#=# curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

Reading the https://curl.se/docs/sslcerts.html explains that the problem is about certificates but it's not clear if it is a server or local problem (the error message is ambiguous).

Tried also, without success:
curl --insecure -fsSL https://ollama.com/install.sh | sh

And this didn't help either:
sudo apt-get install ca-certificates -y

It seems that the Ollama server certificate is not found in my system (but I'm not sure).

===== EDITED =====
Found a workaround.
The problem is not with the visible curl command.
It occurs inside the install.sh script (internal curl commands).
Edited the install.sh file, changed all curl commands with "curl -k" (insecure) and... it WORKED.

Originally created by @tagwato on GitHub (Jun 27, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5330 Hi, Could not install Ollama. Operating system: - Windos Subsystem for Linux (WSL2) - Installed distro: Ubuntu 24.04) Command executed, as explained in https://github.com/ollama/ollama curl -fsSL https://ollama.com/install.sh | sh Gives the following output, with error about a certificate problem. user@WK-325467:~$ curl -fsSL https://ollama.com/install.sh | sh >>> Downloading ollama... ######################################################################## 100.0%#=#=# curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above. Reading the https://curl.se/docs/sslcerts.html explains that the problem is about certificates but it's not clear if it is a server or local problem (the error message is ambiguous). Tried also, without success: curl --insecure -fsSL https://ollama.com/install.sh | sh And this didn't help either: sudo apt-get install ca-certificates -y It seems that the Ollama server certificate is not found in my system (but I'm not sure). ===== EDITED ===== Found a workaround. The problem is not with the visible curl command. It occurs inside the install.sh script (internal curl commands). Edited the install.sh file, changed all curl commands with "curl -k" (insecure) and... it WORKED.
Author
Owner

@bardThis commented on GitHub (Jun 27, 2024):

curl -k

is a bad idea, certificates are broken in some WSL installations. I had the same issue just doing basic things like updates (but I'm not with WSL at the moment)

possibly try this
https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package

https://stackoverflow.com/questions/77846914/getting-the-certificate-authority-is-invalid-or-incorrect-when-running-wsl

<!-- gh-comment-id:2195724653 --> @bardThis commented on GitHub (Jun 27, 2024): ``` curl -k ``` is a bad idea, certificates are broken in some WSL installations. I had the same issue just doing basic things like updates (but I'm not with WSL at the moment) possibly try this https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package https://stackoverflow.com/questions/77846914/getting-the-certificate-authority-is-invalid-or-incorrect-when-running-wsl
Author
Owner

@tagwato commented on GitHub (Jun 28, 2024):

Thanks @bardThis. I agree, "curl -k" is a bad idea. As I said, it was just a workaround.
Found a permanent (and safe) solution.
These 2 commands solved the problem.

  sudo update-ca-certificates -v
  sudo dpkg-reconfigure ca-certificates

Note: maybe just the last command would have been enough, but I ran the 2 in sequence, when testing various solutions.
Looks like something was faulty with my Ubuntu (which was a fresh install).

<!-- gh-comment-id:2195935929 --> @tagwato commented on GitHub (Jun 28, 2024): Thanks @bardThis. I agree, "curl -k" is a bad idea. As I said, it was just a workaround. Found a permanent (and safe) solution. These 2 commands solved the problem. ``` sudo update-ca-certificates -v sudo dpkg-reconfigure ca-certificates ``` Note: maybe just the last command would have been enough, but I ran the 2 in sequence, when testing various solutions. Looks like something was faulty with my Ubuntu (which was a fresh install).
Author
Owner

@Marco-Antonio-Rodrigues commented on GitHub (Aug 4, 2024):

I solved it with: sudo apt install --reinstall curl libcurl4 openssl

<!-- gh-comment-id:2267228798 --> @Marco-Antonio-Rodrigues commented on GitHub (Aug 4, 2024): I solved it with: sudo apt install --reinstall curl libcurl4 openssl
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#29096