[GH-ISSUE #7294] Ollama cannot find libggml_cuda_v12.so on v0.4.0-rc3 #4638

Closed
opened 2026-04-12 15:33:03 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @Blumlaut on GitHub (Oct 21, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7294

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

Running Ollama on Debian Bookworm with nvidia-cuda drivers installed (1x 3060, 1x 3060Ti), upon upgrading to v0.4.0-rc3 (0.3.14 works fine!) i can no longer load any models due to the following error:

/tmp/ollama1623163346/runners/cuda_v12/ollama_llama_server: error while loading shared libraries: libggml_cuda_v12.so: cannot open shared object file: No such file or directory

libggml_cuda_v12.so is present in /usr/local/lib/ollama/:

root@NAS:/usr# find . | grep libggml_cuda_v12
./local/lib/ollama/libggml_cuda_v12.so

forcefully copying the libraries to /tmp/ollama*/runners/cuda_v12/ does make ollama work for the current iteration but surely that is not intended behaviour.

nvidia-smi:

nvidia-smi
Mon Oct 21 14:25:38 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.35.03              Driver Version: 560.35.03      CUDA Version: 12.6     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3060        On  |   00000000:01:00.0 Off |                  N/A |
|  0%   54C    P8             17W /  170W |       4MiB /  12288MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   1  NVIDIA GeForce RTX 3060 Ti     On  |   00000000:05:00.0 Off |                  N/A |
| 31%   35C    P8             14W /  200W |       4MiB /   8192MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

v0.4.0-rc3

Originally created by @Blumlaut on GitHub (Oct 21, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7294 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? Running Ollama on Debian Bookworm with nvidia-cuda drivers installed (1x 3060, 1x 3060Ti), upon upgrading to v0.4.0-rc3 (0.3.14 works fine!) i can no longer load any models due to the following error: ``` /tmp/ollama1623163346/runners/cuda_v12/ollama_llama_server: error while loading shared libraries: libggml_cuda_v12.so: cannot open shared object file: No such file or directory ``` libggml_cuda_v12.so is present in /usr/local/lib/ollama/: ``` root@NAS:/usr# find . | grep libggml_cuda_v12 ./local/lib/ollama/libggml_cuda_v12.so ```` forcefully copying the libraries to `/tmp/ollama*/runners/cuda_v12/` does make ollama work for the current iteration but surely that is not intended behaviour. nvidia-smi: ``` nvidia-smi Mon Oct 21 14:25:38 2024 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 560.35.03 Driver Version: 560.35.03 CUDA Version: 12.6 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 3060 On | 00000000:01:00.0 Off | N/A | | 0% 54C P8 17W / 170W | 4MiB / 12288MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ | 1 NVIDIA GeForce RTX 3060 Ti On | 00000000:05:00.0 Off | N/A | | 31% 35C P8 14W / 200W | 4MiB / 8192MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | No running processes found | +-----------------------------------------------------------------------------------------+ ```` ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version v0.4.0-rc3
GiteaMirror added the linuxnvidiabug labels 2026-04-12 15:33:03 -05:00
Author
Owner

@dhiltgen commented on GitHub (Oct 21, 2024):

Could you share your server log with OLLAMA_DEBUG=1 set? It should set the LD_LIBRARY_PATH to pick that up, but there may be a bug someplace.

<!-- gh-comment-id:2427762749 --> @dhiltgen commented on GitHub (Oct 21, 2024): Could you share your server log with OLLAMA_DEBUG=1 set? It should set the LD_LIBRARY_PATH to pick that up, but there may be a bug someplace.
Author
Owner

@Blumlaut commented on GitHub (Oct 21, 2024):

Sure, here's the log with OLLAMA_DEBUG set:
https://pastebin.com/2fCHTRhq

<!-- gh-comment-id:2427823352 --> @Blumlaut commented on GitHub (Oct 21, 2024): Sure, here's the log with OLLAMA_DEBUG set: https://pastebin.com/2fCHTRhq
Author
Owner

@dhiltgen commented on GitHub (Oct 21, 2024):

How did you install?

I might be misreading the logs, but I think you might have moved the ollama executable around, or copied it instead of leaving the layout as it was in the tar file, and the relative path resolution we use to try to find the libraries didn't work. I see it trying to find the libraries in /usr/local/bin/lib/ollama which is probably wrong.

We expect to find the libraries in ../lib/ollama relative to the primary ollama executable.

<!-- gh-comment-id:2427845806 --> @dhiltgen commented on GitHub (Oct 21, 2024): How did you install? I might be misreading the logs, but I think you might have moved the ollama executable around, or copied it instead of leaving the layout as it was in the tar file, and the relative path resolution we use to try to find the libraries didn't work. I see it trying to find the libraries in `/usr/local/bin/lib/ollama` which is probably wrong. We expect to find the libraries in `../lib/ollama` relative to the primary ollama executable.
Author
Owner

@Blumlaut commented on GitHub (Oct 21, 2024):

Huh, not sure how that happened, i guess when updating i must've made a mistake somewhere, i just wiped out the faulty ollama dir and redownloaded it and it seems to be working fine now! must've been my fault, thanks for the help!

<!-- gh-comment-id:2427851809 --> @Blumlaut commented on GitHub (Oct 21, 2024): Huh, not sure how that happened, i guess when updating i must've made a mistake somewhere, i just wiped out the faulty ollama dir and redownloaded it and it seems to be working fine now! must've been my fault, thanks for the help!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4638