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

Broken Red Hat / CentOS install #158

Closed
JamesRBrown opened this issue May 11, 2022 · 13 comments
Closed

Broken Red Hat / CentOS install #158

JamesRBrown opened this issue May 11, 2022 · 13 comments

Comments

@JamesRBrown
Copy link

MuhammaraJS has the same install issue as the last build of hummus, see issue:

galkahana/HummusJS#461

"has rewriten the published binary

https://hummus.s3-us-west-2.amazonaws.com/hummus/v1.0.110/node-v83-linux-x64-glibc.tar.gz

becase we have one container with hummus instaled more than 10 days ago and this container has

[root@d447d3a54e2d binding]# strings hummus.node | grep GLIBCXX
GLIBCXX_3.4.6
GLIBCXX_3.4.9
GLIBCXX_3.4.15
GLIBCXX_3.4

and is working on CentOS7 where the last version is GLIBCXX_3.4.19

but current version requires
[root@c35e0b799ece binding]# strings hummus.node | grep GLIBCXX
GLIBCXX_3.4.20
GLIBCXX_3.4.9
GLIBCXX_3.4.21
GLIBCXX_3.4.15
GLIBCXX_3.4

and throws

Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /var/appserver/node_modules/hummus/binding/hummus.node)" - @keklabs

@julianhille
Copy link
Owner

Could you elaborate which CentOS version you've got there also which node, nvm, npm versions.

I'm going to try to find a fix but I do not think that downgrading the cxx compiler is a viable solution.

@JamesRBrown
Copy link
Author

system: Red Hat Enterprise Linux Server release 7.9 (Maipo)
node: v14.18.1
npm: 8.6.0
nvm: 0.39.1

Yeah, I've been trying to find a workaround, and I haven't found one yet.

@julianhille
Copy link
Owner

could you give me some info about a cent os version which comes as near as possible to your red hat enterprise version? -thanks for your infos.

@JamesRBrown
Copy link
Author

I would think CentOS 7.9 would be the "equivalent": https://9to5linux.com/centos-linux-7-9-officially-released-based-on-red-hat-enterprise-linux-7-9

However, I'm not sure if they are perfectly a 1:1 or not.

@julianhille
Copy link
Owner

if you dont mind installing gcc and make you could do:
npm rebuild muhammara --build-from-source this would rebuild it in some minutes and then it would work. just the first solution i came up with

@JamesRBrown
Copy link
Author

Thank you, I'll give that a go.

@julianhille
Copy link
Owner

yum install gcc-c++ make and then go into the root dir of you package and then npm rebuild...

@JamesRBrown
Copy link
Author

JamesRBrown commented May 12, 2022

Ok, so I did as you suggested:

muhammara]$ npm rebuild
rebuilt dependencies successfully

I attempted to run the script calling muhammara again:

`$ node attachments.js
internal/modules/cjs/loader.js:1144
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by /h ome/node/node_modules/muhammara/binding/muhammara.node) at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:93:18) at Object.<anonymous> (/home/node/node_modules/muhammara/muhammara.js:5:34) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) { code: 'ERR_DLOPEN_FAILED'

So I'm still seeing the same issue.

@julianhille
Copy link
Owner

Works perfectly fine here.

video.mkv.zip

@JamesRBrown
Copy link
Author

Thanks for the video, I missed the rebuild flags when I issued the command. However, I'm seeing a bunch of errors:

[root@lnx116 muha]$ npm install muhammara

added 1 package, and audited 58 packages in 2s

4 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
[root@lnx116 muha]$ ll
total 28
drwxrwxr-x. 3 root root 49 May 12 07:58 node_modules
-rw-rw-r--. 1 root root 54 May 12 07:58 package.json
-rw-rw-r--. 1 root root 22822 May 12 07:58 package-lock.json
[root@lnx116 muha]$ npm rebuild muhammara --build-from-source
npm ERR! code 1
npm ERR! path /home/root/muha/node_modules/muhammara
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build ${EXTRA_NODE_PRE_GYP_FLAGS:-""}
npm ERR! Failed to execute '/home/root/.nvm/versions/node/v14.18.1/bin/node /home/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/root/muha/node_modules/muhammara/binding/muhammara.node --module_name=muhammara --module_path=/home/root/muha/node_modules/muhammara/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp info build requesting source compile
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - executable path is "/usr/bin/python"
npm ERR! gyp ERR! find Python - version is "2.7.5"
npm ERR! gyp ERR! find Python - version is 2.7.5 - should be >=3.6.0
npm ERR! gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the follng options:
npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack at PythonFinder.fail (/home/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
npm ERR! gyp ERR! stack at PythonFinder.runChecks (/home/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
npm ERR! gyp ERR! stack at PythonFinder. (/home/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:266:16)
npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (/home/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:297:7)
npm ERR! gyp ERR! stack at ChildProcess.exithandler (child_process.js:374:7)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:400:28)
npm ERR! gyp ERR! stack at maybeClose (internal/child_process.js:1058:16)
npm ERR! gyp ERR! stack at Socket. (internal/child_process.js:443:11)
npm ERR! gyp ERR! stack at Socket.emit (events.js:400:28)
npm ERR! gyp ERR! stack at Pipe. (net.js:686:12)
npm ERR! gyp ERR! System Linux 3.10.0-1160.53.1.el7.x86_64
npm ERR! gyp ERR! command "/home/root/.nvm/versions/node/v14.18.1/bin/node" "/home/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/root/muha/node_modules/muhammara/binding/muhammara.node" "--module_name=muhammara" "--module_path=/home/root/muha/node_modules/muhammara/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
npm ERR! gyp ERR! cwd /home/root/muha/node_modules/muhammara
npm ERR! gyp ERR! node -v v14.18.1
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/home/root/.nvm/versions/node/v14.18.1/bin/node /home/root/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/root/muha/node_modules/muhammara/binding/muhammara.node --module_name=muhammara --module_path=/home/root/muha/node_modules/muhammara/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/home/root/muha/node_modules/muhammara/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (events.js:400:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1058:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
npm ERR! node-pre-gyp ERR! System Linux 3.10.0-1160.53.1.el7.x86_64
npm ERR! node-pre-gyp ERR! command "/home/root/.nvm/versions/node/v14.18.1/bin/node" "/home/root/muha/node_modules/muhammara/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" ""
npm ERR! node-pre-gyp ERR! cwd /home/root/muha/node_modules/muhammara
npm ERR! node-pre-gyp ERR! node -v v14.18.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! /home/root/.npm/_logs/2022-05-12T13_59_09_949Z-debug-0.log
[root@lnx116 muha]$
2022-05-12T13_59_09_949Z-debug-0.log

@julianhille
Copy link
Owner

you need to have python3 in place. im not sure why i did not have to.

you could set its path with: --python="/path/to/pythonexecutable" if its not in the default pathes

@JamesRBrown
Copy link
Author

I installed python3 (yum install python3), and things went smoothly from there. I appreciate the workaround. Hopefully the details of our chat will be helpful for anyone else who is having this issue.

@julianhille
Copy link
Owner

I close this for now. Feel free to reopen if needed.

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

2 participants