Troubleshooting Node Installation Failure on Ubuntu Due to Missing GLIBC 2.28 and Recovery Steps
This article recounts a failed Node.js installation on an older Ubuntu server caused by a missing GLIBC 2.28 library, details the attempted GLIBC upgrade script that led to system-wide segmentation faults, and explains how reinstalling a newer Ubuntu version resolved the issue while emphasizing careful backup practices.
Hello, I am Wukong.
Background
After deploying Jenkins, the next step is to deploy the frontend project, which uses AngularJS and therefore requires Node.js for compilation.
Installing Node
The Linux server did not have Node installed, so the binary was downloaded from the official website, extracted, and the environment variables were configured.
Running node -v produced the error:
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
The message indicates that Node requires GLIBC 2.28, which is absent on the current system.
Searching online suggested upgrading the glibc library.
GLIBC 2.28 Upgrade Script
A blog provided the following upgrade script:
# 解压安装包
$ tar -xJf glibc-2.28.tar.xz
$ cd glibc-2.28/
$ mkdir build
$ cd build
# 配置源代码包,以便在系统上进行编译和安装。
$ ../configure --prefix=/usr
$ makeThe script performs three actions: extracting the package, configuring the source, and compiling.
Extract the installation package
Configure the source code
Compile
Executing the script resulted in a “segmentation fault”. After that, every command produced the same fault, SSH could not connect, and a reboot left the system stuck on a black screen.
Further investigation showed that the script’s configure prefix was incorrect; the proper command should be:
../configure --prefix=/usr/glibc-2.28Attempted Fixes
Various online solutions were tried without success. The disk was mounted on another server to back up critical files, such as the Jenkins directory.
Solution
The root cause was an outdated Ubuntu version that does not support the required Node version. Reinstalling a newer Ubuntu release resolved the problem.
Conclusion
When updating core system libraries, proceed with caution: create system images and back up important data before making changes.
Wukong Talks Architecture
Explaining distributed systems and architecture through stories. Author of the "JVM Performance Tuning in Practice" column, open-source author of "Spring Cloud in Practice PassJava", and independently developed a PMP practice quiz mini-program.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.