[GH-ISSUE #1638] Update the Brew command #914

Closed
opened 2026-04-12 10:35:49 -05:00 by GiteaMirror · 20 comments
Owner

Originally created by @3Samourai on GitHub (Dec 20, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1638

When i try to install phi model:

ollama run phi

I got this error

Error: llama runner: failed to load model '/Users/username/.ollama/models/blobs/sha256:bd608f9545597ea3278b78038943059d1c29c62f3ca02c86523014f3a8c7a7f1': 
this model may be incompatible with your version of Ollama. If you previously pulled this model, try updating it by running `ollama pull phi:latest`
Originally created by @3Samourai on GitHub (Dec 20, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1638 ## When i try to install phi model: ``` ollama run phi ``` ## I got this error ``` Error: llama runner: failed to load model '/Users/username/.ollama/models/blobs/sha256:bd608f9545597ea3278b78038943059d1c29c62f3ca02c86523014f3a8c7a7f1': this model may be incompatible with your version of Ollama. If you previously pulled this model, try updating it by running `ollama pull phi:latest` ```
Author
Owner

@jmorganca commented on GitHub (Dec 20, 2023):

Hi @3Samourai, are you on the latest version of Ollama (0.1.17) – that's required to run phi. Sorry it's not more obvious from that error message

<!-- gh-comment-id:1864990512 --> @jmorganca commented on GitHub (Dec 20, 2023): Hi @3Samourai, are you on the latest version of Ollama (0.1.17) – that's required to run `phi`. Sorry it's not more obvious from that error message
Author
Owner

@3Samourai commented on GitHub (Dec 20, 2023):

I just installed it now, so I think I am at the latest version.

<!-- gh-comment-id:1864994911 --> @3Samourai commented on GitHub (Dec 20, 2023): I just installed it now, so I think I am at the latest version.
Author
Owner

@jmorganca commented on GitHub (Dec 20, 2023):

Thanks! Which platform are you on? (e.g. Linux, macOS, GPU, etc)

<!-- gh-comment-id:1865006913 --> @jmorganca commented on GitHub (Dec 20, 2023): Thanks! Which platform are you on? (e.g. Linux, macOS, GPU, etc)
Author
Owner

@3Samourai commented on GitHub (Dec 20, 2023):

macOS 14.1.2, Macbook Pro M2 RAM 8GB

<!-- gh-comment-id:1865015784 --> @3Samourai commented on GitHub (Dec 20, 2023): macOS 14.1.2, Macbook Pro M2 RAM 8GB
Author
Owner

@jmorganca commented on GitHub (Dec 20, 2023):

Would it be possible to check the logs in ~/.ollama/logs/server.log, near the bottom for an error? Thanks so much!

<!-- gh-comment-id:1865031732 --> @jmorganca commented on GitHub (Dec 20, 2023): Would it be possible to check the logs in `~/.ollama/logs/server.log`, near the bottom for an error? Thanks so much!
Author
Owner

@3Samourai commented on GitHub (Dec 20, 2023):

I checked and the file is empty 😢

<!-- gh-comment-id:1865044389 --> @3Samourai commented on GitHub (Dec 20, 2023): I checked and the file is empty 😢
Author
Owner

@jmorganca commented on GitHub (Dec 21, 2023):

Thanks! Did you happen to install Ollama via brew? Or is this via the Mac app?

<!-- gh-comment-id:1865311415 --> @jmorganca commented on GitHub (Dec 21, 2023): Thanks! Did you happen to install Ollama via `brew`? Or is this via the Mac app?
Author
Owner

@xleliu commented on GitHub (Dec 21, 2023):

Thanks! Did you happen to install Ollama via brew? Or is this via the Mac app?

same issue, brew
image

<!-- gh-comment-id:1865762192 --> @xleliu commented on GitHub (Dec 21, 2023): > Thanks! Did you happen to install Ollama via `brew`? Or is this via the Mac app? same issue, brew <img width="323" alt="image" src="https://github.com/jmorganca/ollama/assets/3905437/5642934e-3cf4-466d-9e32-d306460ec6f1">
Author
Owner

@prantlf commented on GitHub (Dec 21, 2023):

The same happened to me. Installed with brew yesterday on an Intel MacBook Pro.

❯ ollama --version
ollama version is 0.0.0

I went for orca-mini instead of phi. It's not so much bigger and it worked :-)

<!-- gh-comment-id:1866095954 --> @prantlf commented on GitHub (Dec 21, 2023): The same happened to me. Installed with `brew` yesterday on an Intel MacBook Pro. ❯ ollama --version ollama version is 0.0.0 I went for `orca-mini` instead of `phi`. It's not so much bigger and it worked :-)
Author
Owner

@3Samourai commented on GitHub (Dec 21, 2023):

Thanks! Did you happen to install Ollama via brew? Or is this via the Mac app?

I used brew

<!-- gh-comment-id:1866210281 --> @3Samourai commented on GitHub (Dec 21, 2023): > Thanks! Did you happen to install Ollama via `brew`? Or is this via the Mac app? I used brew
Author
Owner

@igorschlum commented on GitHub (Dec 21, 2023):

@jmorganca I checked it on my Mac. Trashed Ollama app installed from download and installed thru brew. But it's version 0.1.15 that is installed this version is not compatible with phi. How to make brew install the latest version on Mac? --version displays 0.0.0 (see bellow).

Last login: Tue Dec 19 23:47:44 on ttys012
(base) igor@MacStudiodeIgor ~ % brew install ollama
Warning: ollama 0.1.15 is already installed and up-to-date.
To reinstall 0.1.15, run:
brew reinstall ollama
(base) igor@MacStudiodeIgor ~ % brew reinstall ollama
==> Downloading https://ghcr.io/v2/homebrew/core/ollama/manifests/0.1.15
Already downloaded: /Users/igor/Library/Caches/Homebrew/downloads/eae5c2d48bc11495ba7e0d58865a1cac16068e74ecf85585a6535759aea2f9cb--ollama-0.1.15.bottle_manifest.json
==> Fetching ollama
==> Downloading https://ghcr.io/v2/homebrew/core/ollama/blobs/sha256:80ed768e91d
Already downloaded: /Users/igor/Library/Caches/Homebrew/downloads/030166de7fba913db2361506ec2a00d6071d74f40314e79c7097a8a45ebcb033--ollama--0.1.15.arm64_sonoma.bottle.tar.gz
==> Reinstalling ollama
==> Pouring ollama--0.1.15.arm64_sonoma.bottle.tar.gz
==> Caveats
To start ollama now and restart at login:
brew services start ollama
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/ollama/bin/ollama serve
==> Summary
🍺 /opt/homebrew/Cellar/ollama/0.1.15: 7 files, 15.8MB
==> Running brew cleanup ollama...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).
(base) igor@MacStudiodeIgor ~ % brew services start ollama
==> Successfully started ollama (label: homebrew.mxcl.ollama)

(base) igor@MacStudiodeIgor ~ % ollama --version
ollama version is 0.0.0

(base) igor@MacStudiodeIgor ~ % ollama run phi
Error: llama runner: failed to load model '/Users/igor/.ollama/models/blobs/sha256:bd608f9545597ea3278b78038943059d1c29c62f3ca02c86523014f3a8c7a7f1': this model may be incompatible with your version of Ollama. If you previously pulled this model, try updating it by running ollama pull phi:latest
(base) igor@MacStudiodeIgor ~ %

<!-- gh-comment-id:1867016085 --> @igorschlum commented on GitHub (Dec 21, 2023): @jmorganca I checked it on my Mac. Trashed Ollama app installed from download and installed thru brew. But it's version 0.1.15 that is installed this version is not compatible with phi. How to make brew install the latest version on Mac? --version displays 0.0.0 (see bellow). Last login: Tue Dec 19 23:47:44 on ttys012 (base) igor@MacStudiodeIgor ~ % brew install ollama Warning: ollama 0.1.15 is already installed and up-to-date. To reinstall 0.1.15, run: brew reinstall ollama (base) igor@MacStudiodeIgor ~ % brew reinstall ollama ==> Downloading https://ghcr.io/v2/homebrew/core/ollama/manifests/0.1.15 Already downloaded: /Users/igor/Library/Caches/Homebrew/downloads/eae5c2d48bc11495ba7e0d58865a1cac16068e74ecf85585a6535759aea2f9cb--ollama-0.1.15.bottle_manifest.json ==> Fetching ollama ==> Downloading https://ghcr.io/v2/homebrew/core/ollama/blobs/sha256:80ed768e91d Already downloaded: /Users/igor/Library/Caches/Homebrew/downloads/030166de7fba913db2361506ec2a00d6071d74f40314e79c7097a8a45ebcb033--ollama--0.1.15.arm64_sonoma.bottle.tar.gz ==> Reinstalling ollama ==> Pouring ollama--0.1.15.arm64_sonoma.bottle.tar.gz ==> Caveats To start ollama now and restart at login: brew services start ollama Or, if you don't want/need a background service you can just run: /opt/homebrew/opt/ollama/bin/ollama serve ==> Summary 🍺 /opt/homebrew/Cellar/ollama/0.1.15: 7 files, 15.8MB ==> Running `brew cleanup ollama`... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). (base) igor@MacStudiodeIgor ~ % brew services start ollama ==> Successfully started `ollama` (label: homebrew.mxcl.ollama) (base) igor@MacStudiodeIgor ~ % ollama --version ollama version is 0.0.0 (base) igor@MacStudiodeIgor ~ % ollama run phi Error: llama runner: failed to load model '/Users/igor/.ollama/models/blobs/sha256:bd608f9545597ea3278b78038943059d1c29c62f3ca02c86523014f3a8c7a7f1': this model may be incompatible with your version of Ollama. If you previously pulled this model, try updating it by running `ollama pull phi:latest` (base) igor@MacStudiodeIgor ~ %
Author
Owner

@easp commented on GitHub (Dec 22, 2023):

Someone has to update the brew formula for ollama and submit a pull request. It's not hard to do, but it needs to be done.

<!-- gh-comment-id:1867138001 --> @easp commented on GitHub (Dec 22, 2023): Someone has to update the brew formula for ollama and submit a pull request. It's not hard to do, but it needs to be done.
Author
Owner

@igorschlum commented on GitHub (Dec 22, 2023):

Here is a todo. I never done that before. I can try this week-end if nobody did it before:

Here are some steps to update the Brew formula for Ollama:

• Fork the Homebrew tap repository where the Ollama formula is located. According to the Ollama websitehttps://ollama.ai/, the formula is hosted at https://github.com/ollama/homebrew-ollama

• Clone your forked repository to your local machine and create a new branch for your changes.

• Find the Ollama formula file in the repository. It should be named ollama.rb and located in the Formula folder.

• Edit the formula file with a text editor or an IDE. You need to update the following fields in the formula file:

• url: the URL of the source code archive of the latest version of Ollama. You can find it on the [Ollama releases page].

• version: the version number of the latest version of Ollama. It should match the one in the url field.

• sha256: the SHA-256 checksum of the source code archive. You can calculate it using the shasum -a 256 command on the downloaded archive file.

• revision: the revision number of the formula. You need to increment it by one every time you update the formula.

• Save the formula file and test it locally by running brew install --build-from-source ollama. This will install Ollama from the source code using your updated formula. Make sure there are no errors or warnings during the installation.

• Commit your changes and push them to your forked repository. Then, create a pull request to the original Homebrew tap repository, following the [guidelines] and the [template] provided by Homebrew. Explain the reason and the details of your update, and wait for the review and approval from the Homebrew maintainers.

<!-- gh-comment-id:1867560538 --> @igorschlum commented on GitHub (Dec 22, 2023): Here is a todo. I never done that before. I can try this week-end if nobody did it before: Here are some steps to update the Brew formula for Ollama: • Fork the Homebrew tap repository where the Ollama formula is located. According to the Ollama websitehttps://ollama.ai/, the formula is hosted at https://github.com/ollama/homebrew-ollama • Clone your forked repository to your local machine and create a new branch for your changes. • Find the Ollama formula file in the repository. It should be named ollama.rb and located in the Formula folder. • Edit the formula file with a text editor or an IDE. You need to update the following fields in the formula file: • url: the URL of the source code archive of the latest version of Ollama. You can find it on the [Ollama releases page]. • version: the version number of the latest version of Ollama. It should match the one in the url field. • sha256: the SHA-256 checksum of the source code archive. You can calculate it using the shasum -a 256 command on the downloaded archive file. • revision: the revision number of the formula. You need to increment it by one every time you update the formula. • Save the formula file and test it locally by running brew install --build-from-source ollama. This will install Ollama from the source code using your updated formula. Make sure there are no errors or warnings during the installation. • Commit your changes and push them to your forked repository. Then, create a pull request to the original Homebrew tap repository, following the [guidelines] and the [template] provided by Homebrew. Explain the reason and the details of your update, and wait for the review and approval from the Homebrew maintainers.
Author
Owner

@igorschlum commented on GitHub (Dec 22, 2023):

@3Samourai could you rename the issue in Update the Brew command?

<!-- gh-comment-id:1867561737 --> @igorschlum commented on GitHub (Dec 22, 2023): @3Samourai could you rename the issue in Update the Brew command?
Author
Owner

@3Samourai commented on GitHub (Dec 22, 2023):

@3Samourai could you rename the issue in Update the Brew command?

Done 👍

<!-- gh-comment-id:1867801327 --> @3Samourai commented on GitHub (Dec 22, 2023): > @3Samourai could you rename the issue in Update the Brew command? Done 👍
Author
Owner

@xyproto commented on GitHub (Dec 26, 2023):

@easp This PR lets the CI system automatically create PRs for homebrew when a new release is tagged: https://github.com/jmorganca/ollama/pull/709

<!-- gh-comment-id:1869183053 --> @xyproto commented on GitHub (Dec 26, 2023): @easp This PR lets the CI system automatically create PRs for homebrew when a new release is tagged: https://github.com/jmorganca/ollama/pull/709
Author
Owner

@igorschlum commented on GitHub (Dec 29, 2023):

@xyproto So we just have to wait the next release of Ollama (0.1.18) to have the brew install Ollama script updated?

<!-- gh-comment-id:1872391249 --> @igorschlum commented on GitHub (Dec 29, 2023): @xyproto So we just have to wait the next release of Ollama (0.1.18) to have the brew install Ollama script updated?
Author
Owner

@igorschlum commented on GitHub (Jan 6, 2024):

after the release of Ollama 0.1.18 I tested brew install ollama

And the brew script is not updated for MacOS. It's version 0.1.15 that is installed and cannot run mixtral

Restored session: Sam 6 jan 2024 10:59:21 CET
(base) igor@MacStudiodeIgor-001 ~ % brew install ollama
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################### 100.0%
Warning: Treating ollama as a formula. For the cask, use homebrew/cask/ollama
==> Downloading https://ghcr.io/v2/homebrew/core/ollama/manifests/0.1.15
Already downloaded: /Users/igor/Library/Caches/Homebrew/downloads/eae5c2d48bc11495ba7e0d58865a1cac16068e74ecf85585a6535759aea2f9cb--ollama-0.1.15.bottle_manifest.json
==> Fetching ollama
==> Downloading https://ghcr.io/v2/homebrew/core/ollama/blobs/sha256:80ed768e91d
Already downloaded: /Users/igor/Library/Caches/Homebrew/downloads/030166de7fba913db2361506ec2a00d6071d74f40314e79c7097a8a45ebcb033--ollama--0.1.15.arm64_sonoma.bottle.tar.gz
==> Pouring ollama--0.1.15.arm64_sonoma.bottle.tar.gz
==> Caveats
To restart ollama after an upgrade:
brew services restart ollama
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/ollama/bin/ollama serve
==> Summary
🍺 /opt/homebrew/Cellar/ollama/0.1.15: 7 files, 15.8MB
==> Running brew cleanup ollama...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).
(base) igor@MacStudiodeIgor-001 ~ % ollama --v
Error: unknown flag: --v
(base) igor@MacStudiodeIgor-001 ~ % ollama --version
ollama version is 0.0.0

(base) igor@MacStudiodeIgor-001 ~ % ollama run mixtral
Error: llama runner: failed to load model '/Users/igor/.ollama/models/blobs/sha256:e9e56e8bb5f0fcd4860675e6837a8f6a94e659f5fa7dce6a1076279336320f2b': this model may be incompatible with your version of Ollama. If you previously pulled this model, try updating it by running ollama pull mixtral:latest
(base) igor@MacStudiodeIgor-001 ~ %

<!-- gh-comment-id:1879635866 --> @igorschlum commented on GitHub (Jan 6, 2024): after the release of Ollama 0.1.18 I tested brew install ollama And the brew script is not updated for MacOS. It's version 0.1.15 that is installed and cannot run mixtral Restored session: Sam 6 jan 2024 10:59:21 CET (base) igor@MacStudiodeIgor-001 ~ % brew install ollama ==> Downloading https://formulae.brew.sh/api/formula.jws.json ######################################################################### 100.0% ==> Downloading https://formulae.brew.sh/api/cask.jws.json ######################################################################### 100.0% Warning: Treating ollama as a formula. For the cask, use homebrew/cask/ollama ==> Downloading https://ghcr.io/v2/homebrew/core/ollama/manifests/0.1.15 Already downloaded: /Users/igor/Library/Caches/Homebrew/downloads/eae5c2d48bc11495ba7e0d58865a1cac16068e74ecf85585a6535759aea2f9cb--ollama-0.1.15.bottle_manifest.json ==> Fetching ollama ==> Downloading https://ghcr.io/v2/homebrew/core/ollama/blobs/sha256:80ed768e91d Already downloaded: /Users/igor/Library/Caches/Homebrew/downloads/030166de7fba913db2361506ec2a00d6071d74f40314e79c7097a8a45ebcb033--ollama--0.1.15.arm64_sonoma.bottle.tar.gz ==> Pouring ollama--0.1.15.arm64_sonoma.bottle.tar.gz ==> Caveats To restart ollama after an upgrade: brew services restart ollama Or, if you don't want/need a background service you can just run: /opt/homebrew/opt/ollama/bin/ollama serve ==> Summary 🍺 /opt/homebrew/Cellar/ollama/0.1.15: 7 files, 15.8MB ==> Running `brew cleanup ollama`... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). (base) igor@MacStudiodeIgor-001 ~ % ollama --v Error: unknown flag: --v (base) igor@MacStudiodeIgor-001 ~ % ollama --version ollama version is 0.0.0 (base) igor@MacStudiodeIgor-001 ~ % ollama run mixtral Error: llama runner: failed to load model '/Users/igor/.ollama/models/blobs/sha256:e9e56e8bb5f0fcd4860675e6837a8f6a94e659f5fa7dce6a1076279336320f2b': this model may be incompatible with your version of Ollama. If you previously pulled this model, try updating it by running `ollama pull mixtral:latest` (base) igor@MacStudiodeIgor-001 ~ %
Author
Owner

@xyproto commented on GitHub (Jan 6, 2024):

This flag might be needed to let --version return the correct version:

go build -ldflags="-X=github.com/jmorganca/ollama/version.Version=$pkgver"

Set $pkgver to the correct version first.

See also:

<!-- gh-comment-id:1879790006 --> @xyproto commented on GitHub (Jan 6, 2024): This flag might be needed to let `--version` return the correct version: ```sh go build -ldflags="-X=github.com/jmorganca/ollama/version.Version=$pkgver" ``` Set `$pkgver` to the correct version first. See also: * https://github.com/jmorganca/ollama/issues/1712#issuecomment-1869811597 * The [Arch Linux PKGBUILD](https://gitlab.archlinux.org/archlinux/packaging/packages/ollama/-/blob/21dbdcd75de9cbdb5f2c6a9f7775aea3cbd806b2/PKGBUILD)
Author
Owner

@3Samourai commented on GitHub (Jan 29, 2024):

Tested and work fine

<!-- gh-comment-id:1913782836 --> @3Samourai commented on GitHub (Jan 29, 2024): Tested and work fine
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#914