[GH-ISSUE #7546] libggml linked to wrong cuda version #30561

Closed
opened 2026-04-22 10:18:05 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @jsurloppe on GitHub (Nov 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7546

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

Hi,

I just upgraded to ollama 0.4.0 and loading a model fail with the following error:

/tmp/ollama2415219728/runners/cuda_v12/ollama_llama_server: error while loading shared libraries: libcublas.so.11: cannot open shared object file: No such file or directory
time=2024-11-07T08:55:32.986+01:00 level=ERROR source=sched.go:455 msg="error loading llama server" error="llama runner process has terminated: exit status 127"

It seems that the libggml_cuda_v12.so from the binary distribution is linked to cuda 11

$ ldd libggml_cuda_v12.so 
	linux-vdso.so.1 (0x00007ffd315f8000)
	libcuda.so.1 => /usr/lib64/libcuda.so.1 (0x00007f7bae400000)
	libcublas.so.11 => not found
	libcudart.so.11.0 => not found
	libcublasLt.so.11 => not found
	librt.so.1 => /lib64/librt.so.1 (0x00007f7bf9b83000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f7bf9b7c000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f7bf9b77000)
	libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libstdc++.so.6 (0x00007f7bae000000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f7bae322000)
	libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libgcc_s.so.1 (0x00007f7bf9b52000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f7bade1d000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f7bf9ba9000)

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.4.0

Originally created by @jsurloppe on GitHub (Nov 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7546 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? Hi, I just upgraded to ollama 0.4.0 and loading a model fail with the following error: ``` /tmp/ollama2415219728/runners/cuda_v12/ollama_llama_server: error while loading shared libraries: libcublas.so.11: cannot open shared object file: No such file or directory time=2024-11-07T08:55:32.986+01:00 level=ERROR source=sched.go:455 msg="error loading llama server" error="llama runner process has terminated: exit status 127" ``` It seems that the `libggml_cuda_v12.so` from the binary distribution is linked to cuda 11 ``` $ ldd libggml_cuda_v12.so linux-vdso.so.1 (0x00007ffd315f8000) libcuda.so.1 => /usr/lib64/libcuda.so.1 (0x00007f7bae400000) libcublas.so.11 => not found libcudart.so.11.0 => not found libcublasLt.so.11 => not found librt.so.1 => /lib64/librt.so.1 (0x00007f7bf9b83000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f7bf9b7c000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f7bf9b77000) libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libstdc++.so.6 (0x00007f7bae000000) libm.so.6 => /lib64/libm.so.6 (0x00007f7bae322000) libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libgcc_s.so.1 (0x00007f7bf9b52000) libc.so.6 => /lib64/libc.so.6 (0x00007f7bade1d000) /lib64/ld-linux-x86-64.so.2 (0x00007f7bf9ba9000) ``` ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.4.0
GiteaMirror added the bug label 2026-04-22 10:18:05 -05:00
Author
Owner

@jsurloppe commented on GitHub (Nov 8, 2024):

Hey,

Yes, I figured out how to build it while waiting for a fix to be released,
it works without issue.

Thanks

--
Julien Surloppe @.***>

Le jeu. 7 nov. 2024 à 18:12, Simone Scanzoni @.***> a
écrit :

You can work around it building your own libggml_cuda_v12.so, if you have
the libraries and build tools needed, with a command like this (assuming
CUDA in /opt/cuda and an RTX40xx) from the root of the cloned repository:

make OS=linux CUDA_12=1 CUDA_PATH=/opt/cuda/ CMAKE_CUDA_ARCHITECTURES="89"
GPU_PATH_ROOT_LINUX=/opt/cuda/ -f llama/make/Makefile.cuda_v12


Reply to this email directly, view it on GitHub
https://github.com/ollama/ollama/issues/7546#issuecomment-2462795967,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AE5RQGS62EQT2XN64LWV6LDZ7ONQXAVCNFSM6AAAAABRKTKOQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRSG44TKOJWG4
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:2464227325 --> @jsurloppe commented on GitHub (Nov 8, 2024): Hey, Yes, I figured out how to build it while waiting for a fix to be released, it works without issue. Thanks -- Julien Surloppe ***@***.***> Le jeu. 7 nov. 2024 à 18:12, Simone Scanzoni ***@***.***> a écrit : > You can work around it building your own libggml_cuda_v12.so, if you have > the libraries and build tools needed, with a command like this (assuming > CUDA in /opt/cuda and an RTX40xx) from the root of the cloned repository: > > make OS=linux CUDA_12=1 CUDA_PATH=/opt/cuda/ CMAKE_CUDA_ARCHITECTURES="89" > GPU_PATH_ROOT_LINUX=/opt/cuda/ -f llama/make/Makefile.cuda_v12 > > — > Reply to this email directly, view it on GitHub > <https://github.com/ollama/ollama/issues/7546#issuecomment-2462795967>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AE5RQGS62EQT2XN64LWV6LDZ7ONQXAVCNFSM6AAAAABRKTKOQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRSG44TKOJWG4> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#30561