[GH-ISSUE #9303] ollama --version always return 0.0.0 #68126

Closed
opened 2026-05-04 12:35:52 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @undici77 on GitHub (Feb 23, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9303

What is the issue?

I compile ollama from source code, but ollama --version always print 0.0.0

ollama -v           ✭v0.5.12
ollama version is 0.0.0

Relevant log output


OS

macOS

GPU

Apple

CPU

Apple

Ollama version

v0.5.12

Originally created by @undici77 on GitHub (Feb 23, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9303 ### What is the issue? I compile ollama from source code, but `ollama --version` always print `0.0.0` ``` ollama -v ✭v0.5.12 ollama version is 0.0.0 ``` ### Relevant log output ```shell ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version v0.5.12
GiteaMirror added the bug label 2026-05-04 12:35:52 -05:00
Author
Owner

@rick-github commented on GitHub (Feb 23, 2025):

This is to indicate that the program has been built from source. You can get a version string in the binary if you build using a script from the scripts directory.

<!-- gh-comment-id:2677160510 --> @rick-github commented on GitHub (Feb 23, 2025): This is to indicate that the program has been built from source. You can get a version string in the binary if you build using a script from the `scripts` directory.
Author
Owner

@pacoxu commented on GitHub (Feb 24, 2025):

To make the message clear, a possible enhancement would be something like v0.0.0-main or 0.0.0-aa96283764d.

<!-- gh-comment-id:2677923870 --> @pacoxu commented on GitHub (Feb 24, 2025): To make the message clear, a possible enhancement would be something like `v0.0.0-main` or `0.0.0-aa96283764d`.
Author
Owner

@rick-github commented on GitHub (Feb 24, 2025):

$ VERSION=myversion PLATFORM=linux/amd64 scripts/build_linux.sh 
$ ./dist/bin/ollama -v
ollama version is 0.5.11
Warning: client version is myversion
<!-- gh-comment-id:2677938491 --> @rick-github commented on GitHub (Feb 24, 2025): ``` $ VERSION=myversion PLATFORM=linux/amd64 scripts/build_linux.sh $ ./dist/bin/ollama -v ollama version is 0.5.11 Warning: client version is myversion ```
Author
Owner

@OldishCoder commented on GitHub (Feb 24, 2025):

I'm experiencing the same on WSL2/linux...
When building for linux according to docs/development.md
e.g. cmake -B build; cmake --build build; go run . serve

Ideally when I "git checkout v0.5.12" the version would be set also...
OK, that's too hard/undesirable... got it... but...
in the build docs, maybe suggest how/where to set the version string?
It appears as easy as editing version/version.go. Based on a quick test... <--- @undici77 - does this help you?
-oc

<!-- gh-comment-id:2678971506 --> @OldishCoder commented on GitHub (Feb 24, 2025): I'm experiencing the same on WSL2/linux... When building for linux according to docs/development.md e.g. cmake -B build; cmake --build build; go run . serve Ideally when I "git checkout v0.5.12" the version would be set also... OK, that's too hard/undesirable... got it... but... **in the build docs, maybe suggest how/where to set the version string**? It appears as easy as editing version/version.go. Based on a quick test... <--- @undici77 - does this help you? -oc
Author
Owner

@dhiltgen commented on GitHub (Feb 25, 2025):

As pointed out above, the versioning model is working as designed.

<!-- gh-comment-id:2682687418 --> @dhiltgen commented on GitHub (Feb 25, 2025): As pointed out above, the versioning model is working as designed.
Author
Owner

@undici77 commented on GitHub (Feb 27, 2025):

I'm experiencing the same on WSL2/linux... When building for linux according to docs/development.md e.g. cmake -B build; cmake --build build; go run . serve

Ideally when I "git checkout v0.5.12" the version would be set also... OK, that's too hard/undesirable... got it... but... in the build docs, maybe suggest how/where to set the version string? It appears as easy as editing version/version.go. Based on a quick test... <--- @undici77 - does this help you? -oc

Yes, that clarification is helpful. I initially assumed that the version would be automatically embedded within the version file. In my experience—and typically in all my software—when I clone a tagged version, the version information is directly incorporated into the code.

<!-- gh-comment-id:2687585582 --> @undici77 commented on GitHub (Feb 27, 2025): > I'm experiencing the same on WSL2/linux... When building for linux according to docs/development.md e.g. cmake -B build; cmake --build build; go run . serve > > Ideally when I "git checkout v0.5.12" the version would be set also... OK, that's too hard/undesirable... got it... but... **in the build docs, maybe suggest how/where to set the version string**? It appears as easy as editing version/version.go. Based on a quick test... <--- [@undici77](https://github.com/undici77) - does this help you? -oc Yes, that clarification is helpful. I initially assumed that the version would be automatically embedded within the version file. In my experience—and typically in all my software—when I clone a tagged version, the version information is directly incorporated into the code.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#68126