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

Error while compiling related to missing locale #1283

Closed
juliensnz opened this issue Sep 5, 2017 · 1 comment
Closed

Error while compiling related to missing locale #1283

juliensnz opened this issue Sep 5, 2017 · 1 comment

Comments

@juliensnz
Copy link

Hello, I'm reporting here an issue for which I have already a solution. I spent 4h to fix it so I think that it worth the sharing.

My goal was to install microtime for an IoT project on my Next Thing C.H.I.P. (similar to a Raspberry Pi). Gcc and G++ was installed and properly working. When doing npm install I was getting this error:

Call to 'node -e "require('nan')"' returned exit status 0 while in binding.gyp.

Running node -e "require('nan')" was not displaying any error but was indeed returning a code 0 (which is not an error code btw).
I tried pretty much anything to fix the issue (reinstalling build essential, node-gyp, node, npm, etc).

I then realised that from time to time I was getting this error:

sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

Indeed a locale is missing on this system and this warning is the cause of this fail during the preparation of the compilation.

To fix the problem, simply run

sudo apt-get install locales
localedef -i en_US -f UTF-8 en_US.UTF-8
  • Node Version: latest node 6.x 8.x
  • Platform: Debian (chip kernel 4.4.13)
  • Module: microtime, spi, etc
@bnoordhuis
Copy link
Member

I'll close this out as it's not an issue with node-gyp itself but thanks for the report.

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