bun icon indicating copy to clipboard operation
bun copied to clipboard

version `GLIBC_2.18' not found

Open Rexicon226 opened this issue 1 year ago • 7 comments

What version of Bun is running?

idk i cant run it

What platform is your computer?

Linux 3.10.0-1160.88.1.el7.x86_64 x86_64 x86_64

What steps can reproduce the bug?

Install Bun

curl -fsSL https://bun.sh/install | bash

Run Bun

bun

What is the expected behavior?

Please Worky

What do you see instead?

bun: /usr/lib64/libc.so.6: version GLIBC_2.18' not found (required by bun) bun: /usr/lib64/libc.so.6: version GLIBC_2.25' not found (required by bun)

Additional information

This is literal Linux discrimination, and I will be telling Torvalds about this.

Rexicon226 avatar Sep 16 '23 03:09 Rexicon226

Yes, you cannot run bun in CentOS 7, as glibc version is old. You'd better update your system and use Rocky Linux 9, so that you can happily run bun as well as Deno.

brynne8 avatar Sep 16 '23 05:09 brynne8

Yes, you cannot run bun in CentOS 7, as glibc version is old. You'd better update your system and use Rocky Linux 9, so that you can happily run bun as well as Deno.

I don't want to change my server's system, is there any other solutions?

yuri2peter avatar Sep 18 '23 07:09 yuri2peter

For anyone as desperate as I am to get Bun running on CentOS7, here's what I've tried out that didn't work:

  • downloading the source for GNU C Library my error mentioned both 2.18 and 2.25, therefore I used 2.25...
  • "Building glibc without installing" as described here ("installing" would mean "replacing" for the whole system)
  • patchelf --set-rpath ... on a binary created with bun build --compile ... (I am looking at Bun specifically because it would provide a way to deploy a single binary instead of have to install and update NodeJS)

All this work for a __vdso_timeSegmentation fault...

LucasForster avatar Nov 24 '23 14:11 LucasForster

Hi @LucasForster , I faced the same issue, is this any solution?

giangdip2410 avatar Jan 16 '24 03:01 giangdip2410

Hi @LucasForster , I faced the same issue, is this any solution?

I successfully advocated for the use of containers, therefore I'm not searching for a solution anymore.

Best of luck to you.

LucasForster avatar Feb 09 '24 12:02 LucasForster

Hi, I am also facing this error in Red Hat Linux 7, was anyone able to find any solution for this?

son-ya123 avatar Mar 20 '24 12:03 son-ya123

Hey guys. There's a solution for this now. As https://github.com/corsix/polyfill-glibc/issues/1 fixed for bun, we could polyfill the latest binary release to work on CentOS 7 with glibc 2.17.

brynne8 avatar May 15 '24 03:05 brynne8

Would love to see the polyfill packaged in the binary as well, as im running into this issue when running our executable on production servers still using centos 7 (we are aware of the upcoming eol, but never gonna be succeeding in time to migrate all servers)

0pilatos0 avatar May 24 '24 13:05 0pilatos0

To use bun, we depend on glibc 2.28 or later.

Your best bet to work around this is to use Docker, however also note that using a Linux kernel version below 5.6.0 or so is not recommended, as we rely on recent linux APIs that older kernels may not support.

We are unlikely to support an older glibc than 2.28 as glibc 2.28 itself is a significant maintenance burden (we have a separate build of webkit, can't compile the exact same release build on our local development machines, have to polyfill various system APIs for process spawning, etc)

if you work at a fortune 500-sized company and this is preventing you from adopting Bun -- we could be convinced to change this. But, for now we are unlikely to do that.

Jarred-Sumner avatar Aug 29 '24 10:08 Jarred-Sumner