servicer-labs / servicer

A CLI to simplify service management on systemd
https://servicer.dev
MIT License
427 stars 9 forks source link

I get a GLIBC error on Ubuntu 20 #9

Closed ethereumdegen closed 12 months ago

ethereumdegen commented 1 year ago

/libc.so.6: version `GLIBC_2.34' not found

when trying to run help with teh binary

secretshardul commented 1 year ago

Error on ser --help? Can you tell me about your

rizrmd commented 1 year ago

I had same issue, ubuntu 20.04 by default has glibc 2.31. You can upgrade it using:

apt-get install gawk bison gcc make -y
wget -c https://ftp.gnu.org/gnu/glibc/glibc-2.34.tar.gz
tar -zxvf glibc-2.34.tar.gz && cd glibc-2.34
mkdir glibc-build && cd glibc-build
../configure --prefix=/opt/glibc
make
make install
rizrmd commented 1 year ago

But I hope servicer has binary compiled with glibc 2.31. So I don't have to install entire rust toolchain or upgrading my glibc.

secretshardul commented 1 year ago

The compiled binary picks the libc version from the system where the code was compiled. GLIBC_2.34 could be coming from the Github worker. @ethereumdegen @rizrmd can you try building from source using cargo install servicer?

From stackoverflow

Per the issue: https://github.com/rust-lang/rust/issues/57497 - there's no way to tell the Rust compiler to link a different library other than the one installed on the system.

This means I have to compile the binary on a system that has a less recent version of libc6 installed...