8000 llama-cli: error while loading shared libraries: libllama.so: cannot open shared object file: No such file or directory · Issue #11123 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content

llama-cli: error while loading shared libraries: libllama.so: cannot open shared object file: No such file or directory #11123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
erickwill opened this issue Jan 7, 2025 · 12 comments

Comments

@erickwill
Copy link

Name and Version

Version: llama-b4434-bin-ubuntu-x64

Operating systems

Linux

Which llama.cpp modules do you know to be affected?

llama-cli

Command line

[erick@Xeon bin]$  ./llama-cli -m ~/Apps/Llama/EVA-LLaMA-3.33-70B-v0.1.Q4_K_M.gguf -p "I believe the meaning of life is" -n 128

Problem description & steps to reproduce

Trying to run this new version and got this message:
[erick@Xeon bin]$ ./llama-cli -m ~/Apps/Llama/EVA-LLaMA-3.33-70B-v0.1.Q4_K_M.gguf -p "I believe the meaning of life is" -n 128
./llama-cli: error while loading shared libraries: libllama.so: cannot open shared object file: No such file or directory

The last build version that works properly is: llama-b4406-bin-ubuntu-x64

First Bad Commit

The last build version that works properly is: llama-b4406-bin-ubuntu-x64

Relevant log output

No response

@ahadji05
Copy link

Did you locate the path to libllama.so in your system after the installation and tried to append this path to LD_LIBRARY_PATH?

@CyberT33N
Copy link

Got the same by using the binary files. What do you mean with installation? Should i not work out of the box with binary files?

@CyberT33N
Copy link

So when you build it locally it will work I'll just go this way

git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp


# https://github.com/ggerganov/llama.cpp/blob/master/docs/build.md
# CUDA BUILD
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release

cd build/bin
./llama-cli -m "/home/user/test/xxxxxxxxxx.gguf"

@pqnet
Copy link
pqnet commented Jan 16, 2025

Last builds do not include the .so library anymore. Related:
#11144

@maicogg
Copy link
maicogg commented Jan 24, 2025

Can confirm Ubuntu zip files do not include libllama.so anymore. As a workaround you can either compile it yourself or get the libraries from the Docker version.

@ggerganov
Copy link
Member

Will be fixed with the next release: #11392

Please close the issue when you confirm.

@pqnet
Copy link
pqnet commented Jan 25, 2025

Will be fixed with the next release: #11392

Please close the issue when you confirm.

Have tested b4552, it works on my machine(s). Output of ldd llama-cli on Ubuntu 24.04.1:

 ldd llama-cli
        linux-vdso.so.1 (0x00007fff8b081000)
        libllama.so (0x00007fdfde534000)
        libggml.so (0x00007fdfde525000)
        libggml-base.so (0x00007fdfde451000)
        libcurl.so.4 => /lib/x86_64-linux-gnu/libcurl.so.4 (0x00007fdfde383000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdfde105000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdfde01a000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdfddfec000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdfdddda000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fdfde801000)
        libggml-cpu.so (0x00007fdfddd22000)
        libggml-rpc.so (0x00007fdfddd0e000)
        libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007fdfddce1000)
        libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fdfddcbf000)
        librtmp.so.1 => /lib/x86_64-linux-gnu/librtmp.so.1 (0x00007fdfddca1000)
        libssh.so.4 => /lib/x86_64-linux-gnu/libssh.so.4 (0x00007fdfddc30000)
        libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x00007fdfddc1c000)
        libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007fdfddb72000)
        libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007fdfdd65d000)
        libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fdfdd609000)
        libldap.so.2 => /lib/x86_64-linux-gnu/libldap.so.2 (0x00007fdfdd5ac000)
        liblber.so.2 => /lib/x86_64-linux-gnu/liblber.so.2 (0x00007fdfdd59c000)
        libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007fdfdd4e2000)
        libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007fdfdd4d4000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fdfdd4b6000)
        libgomp.so.1 => /lib/x86_64-linux-gnu/libgomp.so.1 (0x00007fdfdd460000)
        libunistring.so.5 => /lib/x86_64-linux-gnu/libunistring.so.5 (0x00007fdfdd2b3000)
        libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007fdfdd0b9000)
        libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x00007fdfdd071000)
        libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007fdfdd01a000)
        libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fdfdcf96000)
        libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fdfdcecd000)
        libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fdfdcea1000)
        libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fdfdce9b000)
        libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fdfdce8c000)
        libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007fdfdce72000)
        libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007fdfdce4f000)
        libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fdfdccab000)
        libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fdfdcc95000)
        libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fdfdcc8c000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fdfdcc79000)
        libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007fdfdcc6d000)

@Liozhang
Copy link
Liozhang commented Feb 5, 2025

b4641

./build/bin/llama-cli
./build/bin/llama-cli: error while loading shared libraries: libllama.so: cannot open shared object file: No such file or directory

system: Ubuntu 18

@pqnet
Copy link
pqnet commented Feb 6, 2025

b4641

./build/bin/llama-cli ./build/bin/llama-cli: error while loading shared libraries: libllama.so: cannot open shared object file: No such file or directory

system: Ubuntu 18

@Liozhang you have to go into the bin directory to help it find the library:

cd build/bin
./llama-cli

or configure your dynamic loader to find the library in that directory

@neitsab
Copy link
neitsab commented Feb 14, 2025

For people like me who want to package the binary version for their distro, the fix was simply to install the libraries into the system-wide shared library path.

Example adapted from the AUR package I've put together:

sudo install -Dm755 build/bin/lib* -t /usr/lib/

For a concise and helpful intro to shared libraries, see this chapter from the LPI 101 learning material.

@pqnet
Copy link
pqnet commented Feb 15, 2025

For people like me who want to package the binary version for their distro, the fix was simply to install the libraries into the system-wide shared library path.

Example adapted from the AUR package I've put together:

sudo install -Dm755 build/bin/lib* -t /usr/lib/

For a concise and helpful intro to shared libraries, see this chapter from the LPI 101 learning material.

If you are not creating a package, it is better to not mess with the directories where the package manager is putting their stuff, and use /usr/local/lib

@github-actions github-actions bot added the stale label Mar 18, 2025
Copy link
Contributor
github-actions bot commented Apr 1, 2025

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants
0