Resolving GLIBC_2.28 Not Found | NodeJS

Let's see how we can update Ubuntu to get rid of this error.

Keywords: linux, wsl, windows subsystem linux, yarn, npm, gatsby

By Carmen Cincotti Ā 

Over the past few weeks, Iā€™ve been updating this blog to increase the quality of the site, as well as ensuring that the site will last for the next year.

My goal for the next few weeks is to create a section of the blog to share articles from external sources.

This goal is part of my roadmap to be a site where anyone can get here and receive info on the world of computer graphics.

With that said, I encountered an issue while installing an npm package using yarn, yarn add -D gatsby-plugin-netlify, for my Gatsby blog.

When sending the command, I received the warning:

npm install --global yarn yarn add -D gatsby-plugin-netlify node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)

I was using Ubuntu (with WSL (Windows Subsystem for Linux). The version was 18.04.

It was not very clear how to solve this error. I searched sites like StackOverflow, Google, and even Medium. Nothing.

How ā€‹ā€‹should one solve this error? We will look at the answer during this article

Update your Linux distro

Fortunately, the problem is easy to solve. We need to update our Linux distro.

As I said before - the distro that I use is Ubuntu. Ubuntu uses the Advanced Packaging Tool, apt, as the CLI API to do just this.

Going forward, Iā€™ll assume that youā€™re using Ubuntu as well.

To update the version of Ubuntu on your machine, you must use the terminal and input the following commands:

sudo apt purge snapd sudo apt install update-manager-core sudo apt update\nsudo apt list --upgradable\nsudo apt upgrade -y sudo do-release-upgrade

Check your Ubuntu version

Finally, it is possible to check that your Ubuntu is updated:

lsb_release -a

You should see:

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal

Thatā€™s it, GLIBC_2.28 Not Found should no longer be a problem!

Common Errors

During my installation of the Ubuntu update, I encountered some problemsā€¦

If you run into any problems, I advise you to take a look at some common solutions in the following sectionsā€¦

NO_PUBKEY

The following error was really hard to solve:

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY {key}.

The solution is to use the following command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys {key}

If the issue involves Google Cloud, you should encounter this error:

Err:9 http://packages.cloud.google.com/apt google-compute-engine-stretch-stable InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY {key}

As a solution - you should use the following command:

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

Unofficial packages

Another problem you might encounter is:

* Unofficial software packages not provided by Ubuntu Please use the tool 'ppa-purge' from the ppa-purge package to remove software from a Launchpad PPA and try the upgrade again.

To resolve this error, you must use the following command:

grep Foreign /var/log/dist-upgrade/main.log

Next, you should use apt remove to remove third-party packages:

sudo apt remove {package1} {package2}... etc

Then, try to upgrade again!

Resources


Comments for Resolving GLIBC_2.28 Not Found | NodeJS



Written by Carmen Cincotti, computer graphics enthusiast, language learner, and improv actor currently living in San Francisco, CA. Ā Follow @CarmenCincotti

Contribute

Interested in contributing to Carmen's Graphics Blog? Click here for details!