2
Error: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /root/workspace/backend/node_modules/uWebSockets.js/uws_linux_x64_72.node)

Latest glibc version for CentOS 7 is 2.17. I know that latest version for CentOS 8 is 2.30 but I can't upgrade, because my VDS depends on host's machine kernel (which is very old).

Is there any way to run/compile it with glibc-2.17 or update glibc?

EDIT: My kernel version is 2.6.32-042stab141.3.

I can build it and install to /opt/glibc-2.18 without errors, but when I trying to use this I see Segmentation fault error.

P.S. I builded it successfully on Fedora 23 with same OpenVZ kernel.

Dmitriy
  • 159
  • 2
  • 12
  • Did you try to clone its repo and build it? In its docs says it is header only and depends on uSockets C library, so you would need to build it with your glibc and install it, then use uWebSockets. – rboc Dec 06 '19 at 16:11

2 Answers2

2

I have built a custom binary (and tutorial) that will solve your exact problem.

Read it here: https://github.com/dominicklee/uWebSockets.js-for-Centos7

Dharman
  • 30,962
  • 25
  • 85
  • 135
solutionhacker
  • 238
  • 1
  • 8
1

Is there any way to run/compile it with glibc-2.17

Yes: just do it (download source, build on your target machine, profit).

or update glibc?

You didn't say what your "very old kernel" is, but if GLIBC-2.18 supports it, then yes, you can update GLIBC.

However, any mistake you make in the process may make your system un-bootable. See this answer.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362