Version `GLIBC_2.38' not found (required by mongos)

Hi everyone!

I’ve downloaded the community edition of MongoDB on the tgz format. Inside the compressed file there are two files: mongod and mongos. I’ve placed them inside $HOME/.local/bin. When trying to run any of them I got the following error:

mongos: /lib/x86_64-linux-gnu/libm.so.6: version 'GLIBC_2.38' not found (required by mongos)
mongos: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.38' not found (required by mongos)

I’ve upgraded my OS, checked if the library was installed and checked its version and everything seems OK but it still doesn’t work.

How can I make those executables to find the libraries already installed in my system?

This is likely caused by downloading the file for a different version of the OS or installing on an unsupported OS.

Double check both the version of the OS and the download.

The first step is to check the target of glibc in the operating system.
The second step is to download the corresponding version of glibc or install it with apt/dnf/yum, or upgrade glibc.