[GH-ISSUE #1466] ollama list syntax error #789

Closed
opened 2026-04-12 10:28:19 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @NILICK on GitHub (Dec 11, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1466

I installed ollama locally and it works successfully. I used multiple models such as llama2 and mistral. I want to list models name using:
ollama list

But it return:

/usr/bin/ollama: line 2: syntax error near unexpected token `<
/usr/bin/ollama: line 2: `<html><head>'

context of above path ollama file is:

<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>403 Forbidden</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Forbidden</h1>
<h2>Your client does not have permission to get URL <code>/download/ollama-linux-amd64</code> from this server.</h2>
<h2></h2>
</body></html>

How can I use ollama list command?

Originally created by @NILICK on GitHub (Dec 11, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1466 I installed ollama locally and it works successfully. I used multiple models such as `llama2` and `mistral`. I want to list models name using: `ollama list` But it return: ``` /usr/bin/ollama: line 2: syntax error near unexpected token `< /usr/bin/ollama: line 2: `<html><head>' ``` context of above path ollama file is: ``` <html><head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>403 Forbidden</title> </head> <body text=#000000 bgcolor=#ffffff> <h1>Error: Forbidden</h1> <h2>Your client does not have permission to get URL <code>/download/ollama-linux-amd64</code> from this server.</h2> <h2></h2> </body></html> ``` How can I use `ollama list` command?
Author
Owner

@mxyng commented on GitHub (Dec 11, 2023):

It looks like your install was not successful since it didn't download ollama correctly. Does your network use a proxy?

<!-- gh-comment-id:1850526437 --> @mxyng commented on GitHub (Dec 11, 2023): It looks like your install was not successful since it didn't download ollama correctly. Does your network use a proxy?
Author
Owner

@NILICK commented on GitHub (Dec 11, 2023):

@mxyng, thanks, I installed based on #676.

curl -X POST http://localhost:11434/api/pull -d '{ "name": "mistral" }'

Yes, my network uses a proxy.

<!-- gh-comment-id:1850796671 --> @NILICK commented on GitHub (Dec 11, 2023): @mxyng, thanks, I installed based on [#676](https://github.com/jmorganca/ollama/issues/676#issuecomment-1744722380). `curl -X POST http://localhost:11434/api/pull -d '{ "name": "mistral" }'` Yes, my network uses a proxy.
Author
Owner

@mxyng commented on GitHub (Dec 11, 2023):

ollama itself doesn't seem like it's installed correctly. The binary /usr/bin/ollama should be an executable between 300-500MB in size. It shouldn't be an HTML file.

Can you recount your installation steps? Ensure the proxy is configured correctly in the terminal session otherwise, it won't be able to reach out to download the ollama binary.

<!-- gh-comment-id:1850986337 --> @mxyng commented on GitHub (Dec 11, 2023): ollama itself doesn't seem like it's installed correctly. The binary `/usr/bin/ollama` should be an executable between 300-500MB in size. It shouldn't be an HTML file. Can you recount your installation steps? Ensure the proxy is configured correctly in the terminal session otherwise, it won't be able to reach out to download the ollama binary.
Author
Owner

@pdevine commented on GitHub (Mar 12, 2024):

Going to go ahead and close this. @NILICK unfortunately you'll need to re-install Ollama. Feel free to reopen if you're still having the problem.

<!-- gh-comment-id:1989741034 --> @pdevine commented on GitHub (Mar 12, 2024): Going to go ahead and close this. @NILICK unfortunately you'll need to re-install Ollama. Feel free to reopen if you're still having the problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#789