Skip to content
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

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found #68

Closed
vamoko opened this issue Mar 23, 2021 · 23 comments · Fixed by #97
Closed

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found #68

vamoko opened this issue Mar 23, 2021 · 23 comments · Fixed by #97

Comments

@vamoko
Copy link

vamoko commented Mar 23, 2021

Got this error on Ubuntu 18.04, using https://github.com/atanunq/viu/releases/download/v1.3.0/viu

viu: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by viu)

Attempt to fix with, but didn't work:

apt install -y libc6 libc-bin
@RoneoOrg
Copy link

I have the exact same error message on Debian 10

libc6 and libc-bin are already installed:

apt install -y libc6 libc-bin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc-bin is already the newest version (2.28-10).
libc6 is already the newest version (2.28-10).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

@atanunq
Copy link
Owner

atanunq commented Jul 7, 2021

I think this has to do with the way I create the release binary because I compile it locally on a very up-to-date Manjaro Linux. However, I'm not aware of the Rust best practices around this.

If anyone is, please share so that the release process can be improved and work for all of us :)

@simonSlamka
Copy link

simonSlamka commented Jul 16, 2021

viu: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by viu)

Same issue here. Building for arm64 throws this error at the end, complaining about glibc 2.32.

@ossie-git
Copy link

ossie-git commented Aug 3, 2021

Unfortunately, there is no best practice. If you want a statically compiled binary, you can compile against musl. I was able to do so and get it to run successfully:

docker pull rust
docker run --rm --name rust -ti rust bash
apt update
apt -y install musl-tools
git clone https://github.com/atanunq/viu
cd viu
rustup target add x86_64-unknown-linux-musl
cargo build --target x86_64-unknown-linux-musl --release

and then copy the resulting binary. A one-liner of the above which will output it under /tmp:

docker run --rm --name rust -v /tmp:/tmp -ti rust bash -c "apt update && apt -y install musl-tools && git clone https://github.com/atanunq/viu && cd viu && rustup target add x86_64-unknown-linux-musl && cargo build --target x86_64-unknown-linux-musl --release && cp target/x86_64-unknown-linux-musl/release/viu /tmp/viu"

and to verify:

$ ldd /tmp/viu
        statically linked

If you would prefer to build against older GLIBC versions and setup your CI/CD pipeline to do so, you can check out this blog post

@blooalien
Copy link

A one-liner of the above which will output it under /tmp

Thanks much for this… Been wanting to put this useful sounding tool to use. Now I can, with minimal effort. :)

@mehedi02
Copy link

I got the same error for docker in Jenkins container. How should I resolve that. I am running on Manjaro linux

@g-cyan
Copy link

g-cyan commented Dec 21, 2021

I encounter the same problem of /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.32' not found as I try to cargo build --release of actix-web.

@g-cyan
Copy link

g-cyan commented Dec 21, 2021

RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo build --release 

This may work.

@mehedi02
Copy link

@g-cyan Can you please explain where should I add the above command? I am very new to this problem. Can you explain in detail

@g-cyan
Copy link

g-cyan commented Dec 21, 2021

@mehedi02 I used that command to compile rust program and I assume that rust is not used in Jenkins.

@g-cyan
Copy link

g-cyan commented Dec 21, 2021

RUSTFLAGS='--cfg procmacro2_semver_exempt' cargo build --release 

This may work.

Sorry , this only be meant to rust compilation.

@mehedi02
Copy link

@g-cyan thanks for reply. do you have any idea how to solve glibc 2.32 not found (required by docker) in jenkins container

@g-cyan
Copy link

g-cyan commented Dec 22, 2021

@mehedi02 Sorry , I can't help it since I am not good at jenkins.

@Gokul-C
Copy link

Gokul-C commented Mar 8, 2022

@g-cyan thanks for reply. do you have any idea how to solve glibc 2.32 not found (required by docker) in jenkins container

@mehedi02 i got the same error in docker container of jenkins can please tell me how to solve this.

@SkwalExe
Copy link

Worked for me with RUSTFLAGS='--cfg procmacro2_semver_exempt'

@Akpad3tsi
Copy link

I got the same error for docker in Jenkins container. How should I resolve that. I am running on Manjaro linux

Have you been able to find a solution for this ?

@theAkito
Copy link

Anyone who gets that error should upgrade his Linux system or use a newer version of the particular Docker image's base image.

@leiqi96
Copy link

leiqi96 commented Dec 8, 2022

1, compile glibc-2.33 to libc-2.33.so,
http://ftp.gnu.org/gnu/libc/glibc-2.33.tar.gz
2. then link libc.so.6 to libc-2.33.so may solve it.

@pepa65
Copy link

pepa65 commented Jan 25, 2023

I think this has to do with the way I create the release binary because I compile it locally on a very up-to-date Manjaro Linux. However, I'm not aware of the Rust best practices around this.

If anyone is, please share so that the release process can be improved and work for all of us :)

This addition seems to fix it:
becheran/mlc@ecac2bd

@mahesh2121
Copy link

same issue for me jenkins container i am trying to run docker but give same error. any help

@pepa65
Copy link

pepa65 commented Mar 3, 2023

This one-liner builds a static version with musl:
docker run --rm --name rust -v /tmp:/tmp -ti rust bash -c "apt update && apt -y install musl-tools && git clone https://github.com/atanunq/viu && cd viu && rustup target add x86_64-unknown-linux-musl && cargo build --target x86_64-unknown-linux-musl --release && cp target/x86_64-unknown-linux-musl/release/viu /tmp/viu"

@chengzequn
Copy link

same issue for me jenkins container i am trying to run docker but give same error. any help

do you have a solution?

@chengzequn
Copy link

I got the same error for docker in Jenkins container. How should I resolve that. I am running on Manjaro linux

did you finally solve the issue?

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

Successfully merging a pull request may close this issue.