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

Failed to load module with eggjs on Centos7 #370

Closed
moxun33 opened this issue Oct 11, 2021 · 4 comments
Closed

Failed to load module with eggjs on Centos7 #370

moxun33 opened this issue Oct 11, 2021 · 4 comments

Comments

@moxun33
Copy link

moxun33 commented Oct 11, 2021

[egg-scripts] Got error when startup:
[egg-scripts] 2021-10-11 11:58:42,760 ERROR 30307 nodejs.Error: Can not load bindings, file: /app/www/inv/node_modules/@napi-rs/canvas-linux-x64-gnu/skia.linux-x64-gnu.node existed but error occurred while require it: /app/www/mgt/node_modules/@napi-rs/canvas-linux-x64-gnu/skia.linux-x64-gnu.node: undefined symbol: _ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE
[egg-scripts] file: /app/www/inv-/node_modules/@napi-rs/canvas-linux-x64-musl/skia.linux-x64-musl.node existed but error occurred while require it: /app/www/invnode_modules/@napi-rs/canvas-linux-x64-musl/skia.linux-x64-musl.node: undefined symbol: fstat64
[egg-scripts] Installed packages: [canvas-linux-x64-gnu, canvas-linux-x64-musl]
[egg-scripts] file: /app/www/inv/node_modules/@napi-rs/canvas-linux-x64-musl/skia.linux-x64-musl.node existed but error occurred while require it: /app/www/in/node_modules/@napi-rs/canvas-linux-x64-musl/skia.linux-x64-musl.node: undefined symbol: fstat64
[egg-scripts] Installed packages: [canvas-linux-x64-gnu, canvas-linux-x64-musl]
[egg-scripts]     at loadBinding (/app/www/inv/node_modules/@node-rs/helper/lib/loader.js:50:11)
[egg-scripts]     at Object.<anonymous> (/app/www/inv/node_modules/@napi-rs/canvas/index.js:25:5)
[egg-scripts]     at Module._compile (internal/modules/cjs/loader.js:999:30)
[egg-scripts]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[egg-scripts]     at Module.load (internal/modules/cjs/loader.js:863:32)
[egg-scripts]     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
[egg-scripts]     at Module.require (internal/modules/cjs/loader.js:887:19)
[egg-scripts]     at require (internal/modules/cjs/helpers.js:74:18)
[egg-scripts]     at Object.<anonymous> (/app/www/inv/dist/utils/veri-screenshot.js:3:46)
[egg-scripts]     at Module._compile (internal/modules/cjs/loader.js:999:30)
[egg-scripts]
[egg-scripts] pid: 30307
[egg-scripts] hostname: paas.g1
[egg-scripts]
[egg-scripts] 2021-10-11 11:58:42,761 ERROR 30307 [agent_worker] start error, exiting with code:1
[egg-scripts] 2021-10-11 11:58:42,785 ERROR 30298 nodejs.AgentWorkerDiedError: [master] agent_worker#1:30307 died (code: 0, signal: null)
[egg-scripts]     at Master.onAgentExit (/app/www/inv/node_modules/egg-cluster/lib/master.js:425:17)
[egg-scripts]     at Master.emit (events.js:314:20)
[egg-scripts]     at Messenger.sendToMaster (/app/www/inv/node_modules/egg-cluster/lib/utils/messenger.js:137:17)
[egg-scripts]     at Messenger.send (/app/www/inv/node_modules/egg-cluster/lib/utils/messenger.js:102:12)
[egg-scripts]     at ChildProcess.<anonymous> (/app/www/inv/node_modules/egg-cluster/lib/master.js:289:22)
[egg-scripts]     at Object.onceWrapper (events.js:421:26)
[egg-scripts]     at ChildProcess.emit (events.js:314:20)
[egg-scripts]     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
[egg-scripts] name: "AgentWorkerDiedError"
[egg-scripts] pid: 30298
[egg-scripts] hostname: paas.g1
[egg-scripts]
[egg-scripts] 2021-10-11 11:58:42,785 ERROR 30298 [master] agent_worker#1:30307 start fail, exiting with code:1
[egg-scripts] 2021-10-11 11:58:42,786 ERROR 30298 [master] exit with code:1
[egg-scripts]
[egg-scripts] Start got error, see /home/user/logs/master-stderr.log
[egg-scripts] Or use `--ignore-stderr` to ignore stderr at startup.
Done in 3.90s.
@Brooooooklyn
Copy link
Owner

Support CentOS 7 is hard, you can upgrade your system or use the node:lts official Docker image.

@rambo-panda
Copy link
Contributor

Test platform

  • CentOS Linux release 7.9.2009 (Core)
  • CentOS Linux release 7.5.1804 (Core)

I solved it through the following steps

  1. upgrade ldd (libc) version
cd /tmp
wget http://mirrors.ustc.edu.cn/gnu/libc/glibc-2.18.tar.gz
tar -zxvf glibc-2.18.tar.gz &&  cd glibc-2.18
mkdir build && cd build
../configure --prefix=/usr
make && make install

## make install (maybe)
yum -y install gcc automake autoconf libtool make
  1. upgrade /lib64/libstdc++.so.6
### before
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBC_2.3
GLIBC_2.2.5
GLIBC_2.14
GLIBC_2.4
GLIBC_2.3.2
GLIBCXX_DEBUG_MESSAGE_LENGTH


### after

GLIBCXX_DEBUG_MESSAGE_LENGTH
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBC_2.3
GLIBC_2.2.5
GLIBC_2.14
GLIBC_2.18
GLIBC_2.17
GLIBC_2.3.2

@anchingan
Copy link

Hi @rambo-panda, I am a beginner using linux system. Can you please detailed how to upgrade /lib64/libstdc++.so.6 in step 2? Mine path is /usr/lib64/libstdc++.so.6 , am I in the correct folder?
Also, I only able to do ../configure --prefix=/opt/glibc-2.18 in step 1 per post here.
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants