Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is it possible to run on ubuntu 18.04? #14387

Answered by misutoneko
canh25xp asked this question in Q&A
Discussion options

I know this is a really old distribution, but let's say I can only run on this version of ubuntu.

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"

I try to run with the latest prebuilt "llama-b5757-bin-ubuntu-x64.zip" and get this error

./llama-cli: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ./llama-cli)
./llama-cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./llama-cli)
./llama-cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./llama-cli)
./llama-cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./llama-cli)
./llama-cli: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by ./llama-cli)
./llama-cli: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./llama-cli)
./llama-cli: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by ./llama-cli)
./llama-cli: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by ./llama-cli)
./llama-cli: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by libllama.so)
./llama-cli: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by libllama.so)
./llama-cli: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by libllama.so)
./llama-cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by libllama.so)
./llama-cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by libllama.so)
./llama-cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by libggml.so)
./llama-cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by libggml.so)
./llama-cli: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by libggml.so)
./llama-cli: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by libggml-base.so)

I know this mean my libc version is too old, but is there any workaround ? Has any one successfully run this on ubuntu 18.04 ?

You must be logged in to vote

Yes it is possible, but super tedious. It's much better to just build it yourself, or upgrade the OS.
(Or maybe utilize a virtual machine, or something...)

If you still want to do it, this is the method I've used.
(And yeah I'd be interested to hear if anyone has a better way!)

  • Copy over all the libraries that the binary needs (you need to get them from a new distro, somehow).
  • Use the LD_LIBRARY_PATH environment variable to point to the directory where they are located.
  • Launch the binary with the new version of ld-linux-x86-64.so.2.

For example, if you have the libs in $HOME/tmp/newlibs you can try something like:
LD_LIBRARY_PATH=$HOME/tmp/newlibs $HOME/tmp/newlibs/ld-linux-x86-64.so.2 ...

Replies: 1 comment 1 reply

Comment options

Yes it is possible, but super tedious. It's much better to just build it yourself, or upgrade the OS.
(Or maybe utilize a virtual machine, or something...)

If you still want to do it, this is the method I've used.
(And yeah I'd be interested to hear if anyone has a better way!)

  • Copy over all the libraries that the binary needs (you need to get them from a new distro, somehow).
  • Use the LD_LIBRARY_PATH environment variable to point to the directory where they are located.
  • Launch the binary with the new version of ld-linux-x86-64.so.2.

For example, if you have the libs in $HOME/tmp/newlibs you can try something like:
LD_LIBRARY_PATH=$HOME/tmp/newlibs $HOME/tmp/newlibs/ld-linux-x86-64.so.2 /path/to/llama-cli --help

Most likely it will result in a segfault, because some lib was missing.
You can check them with ldd or by setting LD_TRACE_LOADED_OBJECTS=1.

Good luck!

You must be logged in to vote
1 reply
Comment options

Thank you, I ended up compile it by my self.

Answer selected by canh25xp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /