Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/lib64/libc.so.6: version 'GLIBC_2.25' not found #6071

Closed
neo7-studio-web opened this issue Jun 4, 2021 · 28 comments
Closed

/lib64/libc.so.6: version 'GLIBC_2.25' not found #6071

neo7-studio-web opened this issue Jun 4, 2021 · 28 comments

Comments

@neo7-studio-web
Copy link

Just updated from rc71 to rc73

When running npx directus bootstrap :
/lib64/libc.so.6: version 'GLIBC_2.25' not found (required by [...] /node_modules/argon2/lib/binding/napi-v3/argon2.node)

Centos 7.9

New requirement with new version of argon ?

@neo7-studio-web neo7-studio-web changed the title /lib64/libc.so.6: version 'GLIBC_2.25' not found on bootstrap /lib64/libc.so.6: version 'GLIBC_2.25' not found on bootstrap in rc73 Jun 4, 2021
@Enhed
Copy link
Contributor

Enhed commented Jun 4, 2021

same error, cant run directus on docker FROM node:14.17

npx directus start
/lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.25' not found (required by /app/node_modules/argon2/lib/binding/napi-v3/argon2.node) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! lvs-cms@1.0.1 start: npx directus start`
npm ERR! Exit status 1

@Enhed
Copy link
Contributor

Enhed commented Jun 4, 2021

npm install argon2 --build-from-source
fix that error

@dsivokhin
Copy link

Ubuntu 16.04, node 14.17, npm 7.16, rc 73

Same error

Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /srv/www/directus9.dev/node_modules/argon2/lib/binding/napi-v3/argon2.node)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1127:18)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/srv/www/directus9.dev/node_modules/argon2/argon2.js:9:56)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)

@rijkvanzanten
Copy link
Member

Make sure to check ranisalt/node-argon2#276 and ranisalt/node-argon2#294. It sounds like you're missing some required components in your host machine for Node to properly be able to build native extensions. This is not something we can address in Directus itself

@rijkvanzanten rijkvanzanten changed the title /lib64/libc.so.6: version 'GLIBC_2.25' not found on bootstrap in rc73 /lib64/libc.so.6: version 'GLIBC_2.25' not found Jun 4, 2021
@dmtkpv
Copy link

dmtkpv commented Jun 8, 2021

install python 3.6 and gcc
run node-pre-gyp rebuild -C ./node_modules/argon2

@Fusseldieb
Copy link
Sponsor Contributor

npm install argon2 --build-from-source

This solved my issue, thank god ahahaha

@neo7-studio-web
Copy link
Author

neo7-studio-web commented Jun 22, 2021

npm install argon2 --build-from-source
fix that error

This works great for an existing project. Unfortunately, it doest not work for a new project

npx create-directus-project my-project

Results in :

/lib64/libc.so.6: version `GLIBC_2.25' not found (required by ...node_modules/argon2/lib/binding/napi-v3/argon2.node)

As of some research, GLIBC_2.25 cannot be installed on Centos 7. Is there is a way to install directus anyway ?

@neo7-studio-web
Copy link
Author

Anyway I manged to install manually.

@prikr
Copy link

prikr commented Jul 14, 2021

If someone is using Directus inside a docker environment, try using npm install argon2 --build-from-source after the actual npm install.

In my example these were my dockerfileLines:

  "schemaVersion": 2,
  "dockerfileLines": [
    "FROM node:14.5.0",
    "RUN mkdir -p /usr/src/app",
    "WORKDIR /usr/src/app",
    "ADD https://www.google.com /time.now",
    "COPY ./package.json /usr/src/app/",
    "RUN npm install && npm cache clean --force",
    "RUN npm install argon2 --build-from-source",
    "COPY ./ /usr/src/app",
    "ENV NODE_ENV production",
    "ENV PORT 8055",
    "EXPOSE 8055",
    "CMD [ \"npm\", \"start\" ]"
  ]
}```

@neo7-studio-web
Copy link
Author

Just an update that this problem is still here. Directus is incompatible with CentOS 7.

@rijkvanzanten
Copy link
Member

@neo7-studio-web Did you try installing with --build-from-source ?

@neo7-studio-web
Copy link
Author

Yes I did. Didn't work.

@rijkvanzanten
Copy link
Member

Okay, any particular issue in the build? By building from source, node will require all the development tools (including gcc, make) to be available and at a version that's compatible with the dependencies that use native binaries, like argon2. I'm no CentOS user myself, but assuming all the build dependencies are available, there shouldn't be any reason why Directus itself wouldn't run, as centos is just x86 linux at the end of the day

@rijkvanzanten
Copy link
Member

rijkvanzanten commented Sep 17, 2021

I just tried it out on a clean CentOS 7 installation coming from Docker, and assuming you have your dependencies and build tools up to date, it seems to work just fine:

On my Mac:

docker run -ti -p 8055:8055 centos:7

Within the container:

yum update -y
yum -y install curl
curl -sL https://rpm.nodesource.com/setup_16.x | bash -
yum install -y nodejs

yum install -y gcc-c++ make

yum install -y centos-release-scl
yum install -y devtoolset-7-gcc*
scl enable devtoolset-7 bash

mkdir my-project
cd my-project

npm init -y
npm i directus --build-from-source

touch .env
vi .env

## Set to:
# KEY=example-centos
# SECRET=my-secret-string
# ADMIN_EMAIL="admin@example.com"
# ADMIN_PASSWORD="password"
# DB_CLIENT="sqlite3"
# DB_FILENAME="./data.db"
##

npx directus bootstrap
npx directus start

This ran as expected on my end @neo7-studio-web

@neo7-studio-web
Copy link
Author

Thank you for taking all this time to test, I really appreciate.
I don't know what to say. Last updates are resulting in this error as from rc 73. I assume devtools are installed on my CentoOS as directus was working before. This is a production environment I can't do a fresh install. I assume there is an update to make to GLIBC but I don't know how (tried several things from the net).

@neo7-studio-web
Copy link
Author

neo7-studio-web commented Sep 18, 2021

I think I found a solution here : ranisalt/node-argon2#276 (comment)
yum install gcc gcc-c++ kernel-devel
then
npm rebuild argon2 --build-from-source

Actually I had gcc and gcc-c++ already installed but not kernel-devel

Now it works !

@curious-monggo
Copy link

*wipes sweat
Thank you @neo7-studio-web !
I have scoured the web for a solution, tried use make command to build the specific 2.25 version, changed some env vars. Was not able to understand a thing. This on the other hand, simply worked, YAAY PROGRAMMING!
I can finally sleep!
(Note: directus still not running

PUBLIC_URL should be a full URL > hehe totally no idea
Upload directory is not read/writeable! > maybe I only need to change it to 755
Database doesn't have Directus tables installed. > running the command for db driver might help
But the fight must go on!
)

@rijkvanzanten
Copy link
Member

@curious-monggo FWIW

PUBLIC_URL should be a full URL > hehe totally no idea

The environment variable should be a full valid URL, like https://directus.example.com/

Upload directory is not read/writeable! > maybe I only need to change it to 755

Correct, whatever you have configured as the storage location can't be read/written from/to

Database doesn't have Directus tables installed. > running the command for db driver might help

Yeah! You can run directus bootstrap to bootstrap the database 👍🏻

@curious-monggo
Copy link

Thank you, @rijkvanzanten !
I really appreciate the response, great tech!

@cdwmhcc
Copy link

cdwmhcc commented Nov 17, 2021

Same, mark

@kroawen
Copy link

kroawen commented Nov 29, 2021

On centos 7.9, I update glibc 2.1 to 2.28 , it works:
1Check Glibc version: strings /lib64/libc.so.6 | grep GLIBC , On my System ,it get:

GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_PRIVATE.   

I need update GLIBC_2.17 to higher version , recommend Glibc 2.28.

First please update gcc ,make,bison ,then install Glibc 2.28):
recommend update:

---------------------------------
**gcc 8.2.0 :** 
$ gcc -v
$ yum -y install wget bzip2 gcc gcc-c++ glibc-headers
download package :https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc 
or
$ wget -c -P /software/ https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.gz

$ cd /software/
$ tar -zxvf gcc-8.2.0.tar.gz

$ cd gcc-8.2.0
$ ./contrib/download_prerequisites   
result:
gmp-6.1.0.tar.bz2: OK
mpfr-3.1.4.tar.bz2: OK
mpc-1.0.3.tar.gz: OK
isl-0.18.tar.bz2: OK
All prerequisites downloaded successfully.

$ mkdir build
$ cd bulid
$ ../configure --prefix=/usr/local/gcc-8.2.0 --enable-bootstrap --enable-checking=release --enable-languages=c,c++ --disable-multilib

$ make 
My system execute make command at least 3 hours, please waiting it complete.

then: 
$ make install

$ echo -e '\nexport PATH=/usr/local/gcc-8.2.0/bin:$PATH\n' >> /etc/profile.d/gcc.sh && source /etc/profile.d/gcc.sh

$ ln -sv /usr/local/gcc-8.2.0/include/ /usr/include/gcc

$  ldconfig -v    

$ ldconfig -p |grep gcc
result: 
libgcc_s.so.1 (libc6,x86-64) => /lib64/libgcc_s.so.1

check version 
$  gcc -v 

------------------------------------
**make 4.2.1:**
First download make 4.2.1 from https://ftp.gnu.org/gnu/make/
$ make -v 
$ tar -zxvf make-4.2.1.tar.gz
$ cd make-4.2.1
$ mkdir build
$ cd build
$ ../configure --prefix=/usr
$ sh build.sh
$ make install
check result 
$make -v

----------------------------------------
**bison 3.0.4**
$ bison -V
if not found result ,need install:

$ yum install -y bison

--------------------------------------------------------
all complete , you can install glibc-2.28

download glibc-2.28 from http://ftp.gnu.org/gnu/glibc. 
put it into /software

You can adopt the following steps:

$ tar -xf glibc-2.28.tar.gz
$ cd glibc-2.28
$ mkdir build
$ cd build
$ ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

$ make
$ make install 
$ ls -l /lib64/libc.so.6

Last, check version : 
$ strings /lib64/libc.so.6 | grep GLIBC
.....
GLIBC_2.26
GLIBC_2.27
GLIBC_2.28
GLIBC_PRIVATE

It completed .

Other : 
bootstarp Directus , maybe get error: 
Import Error: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found, you reed update CXXABI : 

$ strings /usr/lib64/libstdc++.so.6 | grep 'CXXABI'

download:[ libstdc++.so.6.0](https://www.02405.com/uploads/soft/201124/1-2011241A414.zip)
put it into /usr/lib64 

$  cd /usr/lib64
$ rm -rf libstdc++.so.6
$ ln -s libstdc++.so.6.0.22 libstdc++.so.6

@flawlessweb
Copy link

Anyway I manged to install manually.

how?

@mindplay-dk
Copy link

Doesn't work on WSL 2 either.

$ npm init directus-project myproject
node:internal/modules/cjs/loader:1187
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /home/mindplay/workspace/myproject/node_modules/argon2/lib/binding/napi-v3/argon2.node)
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1187:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/mindplay/workspace/myproject/node_modules/argon2/argon2.js:6:25)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_DLOPEN_FAILED'
}
✖ Installing Directus
Error: undefined
npm ERR! code 1
npm ERR! path /home/mindplay/workspace
npm ERR! command failed
npm ERR! command sh -c create-directus-project "myproject"

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/mindplay/.npm/_logs/2022-11-21T18_46_10_580Z-debug-0.log

I tried a couple of the commands people suggested above, but I'm not a linux person, so I have no idea how to fix this.

My system meets your listed requirements, so it seems like you have some requirements that aren't listed?

@kellvembarbosa
Copy link

https://www.02405.com/uploads/soft/201124/1-2011241A414.zip

Thanks for the tutorial, first it worked, now this link is offline, can you help me?

@cube-dan
Copy link

Here's what worked for me for on CentOS 7:

  1. Install this SCL: https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/ — thanks for the hint @toilandtrouble, here: Argon2 build fails on GCC 4.8 ranisalt/node-argon2#117 (comment)
# install SCL
sudo yum install centos-release-scl
sudo yum-config-manager --enable rhel-server-rhscl-7-rpms
# install devtoolset-7
sudo yum install devtoolset-7
# enable devtoolset-7 (probably doesn't matter that I do this step from the root of the project; same folder as node_modules)
scl enable devtoolset-7 bash
  1. Freshen node_modules and package-lock.json (reinstall everything)
rm -Rf node_modules package-lock.json
npm install
  1. rebuild argon2 from source — thanks for the hint @davidsandoz, here: Broken argon2.node on RHEL7 ranisalt/node-argon2#276
npm rebuild argon2 --build-from-source

That’s it ... you can now run directus:

npm run start

@hakulamtta
Copy link

hakulamtta commented May 16, 2023

make install

I tried these commands to install gcc. It's more faster and easier to do~
$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-8-gcc*
$ scl enable devtoolset-8 bash
$ gcc -v
You can replace step 2 into sudo yum install devtoolset-7-gcc* if you want to install version 7.

@jrbe228
Copy link

jrbe228 commented Jun 5, 2023

@kroawen's answer works for me in a container. But only when executing commands interactively. Still trying to fix the Dockerfile. Any ideas why?

A separate issue is the yum package manager seems to be broken after the final make install.

@kpsanmao
Copy link

kpsanmao commented Jul 31, 2023

lib64

Hi,I'm the webmaster of the 02405.com site and I apologize for the change in the file url due to the rewrite, I have uploaded a copy of that file.I hope it can help you.
1-2011241A414.zip
Also ,you can get get other versions from
https://pkgs.org/download/libstdc++.so.6(GLIBCXX_3.4.22)(64bit)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests