question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

node sharp install in docker on Aarch64 fails

See original GitHub issue

Platform is ODroid C2 - Amlogic S905 ARMv8 (AARCH64) I’m trying to install sharp for use with node.js v 8.x. While building docker when use package.json to setup the environment, it completes and includes sharp. But when I do a require(‘sharp’) I get the following error message:

Error: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version 'CXXABI_1.3.9' not found (required by /usr/src/app/node_modules/sharp/build/Release/../../vendor/lib/libvips-cpp.so.42) at Object.Module._extensions..node (module.js:681:18) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (/usr/src/app/node_modules/sharp/lib/constructor.js:9:15) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32)

I tried to install sharp separately again - “RUN npm install sharp” (dockers way of doing it) and it fails and spits out the following error message:

` Step 6/11 : RUN npm install sharp —> Running in 9143ae79b1ab npm ERR! path /usr/src/app/node_modules/color-name npm ERR! code EINVAL npm ERR! errno -22 npm ERR! syscall rmdir npm ERR! EINVAL: invalid argument, rmdir ‘/usr/src/app/node_modules/color-name’

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-08-22T17_46_49_359Z-debug.log `

I find it odd that sharp wants to remove directory “/usr/src/app/node_modules/color-name” in the first place. Anyhow, I verified that this path it is trying to remove is valid, so I’m not sure why this is failing.

Please advice on how to troubleshoot this ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
ajiratech2commented, Aug 24, 2018

Thanks lovell. I’ll need to spend some time figuring out how to do that. I’ll report back in a couple of days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error to build AWS Lambda Node 14arm64 with Sharp on a ...
The error message said that the problem is related with libvips : sharp: Installation error: Use with glibc 2.26 requires manual ...
Read more >
Can't install Sharp - node.js - Stack Overflow
I have solved this error by downgrading node version to 10.0.0 . It really works!
Read more >
Installation - High performance Node.js image processing
The npm install --ignore-scripts=false flag must be used when npm has been configured to ignore installation scripts. Check the output of running npm...
Read more >
Error while building docker image - RaspberryPi and ARM
Step 15/25 : RUN set -x && cd /app/bundle/programs/server && npm install && npm install -g node-gyp && rm -rf npm/node_modules/sharp && npm...
Read more >
npm err! path /usr/src/app | The AI Search Engine You Control
when run docker, error occurred (npm ERR! path /package.json) ... FROM node:8 # Create app directory WORKDIR /usr/src/app # Install app dependencies #...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found