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

Lambda AWS issue #152

Open
hectorprats opened this issue Aug 17, 2020 · 5 comments
Open

Lambda AWS issue #152

hectorprats opened this issue Aug 17, 2020 · 5 comments

Comments

@hectorprats
Copy link

With nodejs10.x in lambda AWS

const Magic = require('mmmagic')

{
"errorType": "Error",
"errorMessage": "libnode.so.64: cannot open shared object file: No such file or directory",
"trace": [
"Error: libnode.so.64: cannot open shared object file: No such file or directory",
" at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)",
" at Module.load (internal/modules/cjs/loader.js:653:32)",
" at tryModuleLoad (internal/modules/cjs/loader.js:593:12)",
" at Function.Module._load (internal/modules/cjs/loader.js:585:3)",
" at Module.require (internal/modules/cjs/loader.js:692:17)",
" at require (internal/modules/cjs/helpers.js:25:18)",
" at Object. (/opt/nodejs/node_modules/mmmagic/lib/index.js:1:13)",
" at Module._compile (internal/modules/cjs/loader.js:778:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)",
" at Module.load (internal/modules/cjs/loader.js:653:32)"
]
}

@mscdex
Copy link
Owner

mscdex commented Aug 17, 2020

That's a problem with the node installation, not mmmagic.

@hectorprats
Copy link
Author

It happens only with this library

@mscdex
Copy link
Owner

mscdex commented Aug 17, 2020

I don't have anything to suggest as I don't use Lambda. mmmagic builds and executes just fine on normal *nix and Windows though.

@elitan
Copy link

elitan commented Jul 14, 2021

@hectorprats This should be an issue or question for AWS Lambda on how to fix:

Error: libnode.so.64: cannot open shared object file: No such file or directory"

@Bessonov
Copy link

Bessonov commented Dec 7, 2022

To make it work for lambda, you MUST install (and implicitly compile) it for the right version of your runtime. It is different from your local machine. To do so you can use for example this docker image: https://hub.docker.com/_/amazonlinux .

Because this issue is very old, it, probably, can be closed.

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