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 installing on Raspberry pi 2 B #615

Closed
hasael opened this issue Mar 13, 2016 · 15 comments
Closed

Error installing on Raspberry pi 2 B #615

hasael opened this issue Mar 13, 2016 · 15 comments

Comments

@hasael
Copy link

hasael commented Mar 13, 2016

Hello,
I have been trying for the past few hours installing the module on my raspberry pi running Raspbian.
But keep getting the same error. I have checked I have the latest version of npm and nodejs installed.
nodejs: v4.0.0, npm: v 3.8.1
Output Window from sudo npm install --unsafe-perm --verbose -g sqlite3
https://gist.github.com/elman90/7d3d2e7ee730bd9b8bd7
Debug log
https://gist.github.com/elman90/a19ea08a767e129018fa

@springmeyer
Copy link
Contributor

This version of node/NAN/v8 requir es a C++11 compiler

That is from the first log. You need to set CXX environment variable to a compiler that supports the -std=c++11 flag.

@hasael
Copy link
Author

hasael commented Mar 13, 2016

Thank you for the reply.
I have not changed these compiler related variables before, and relatively new to this.
I tried with
~ $ CXX=gcc-4.8
which by the man page should support C++11. Also by a few searches tried this.
~ $ export CXX=clang++
~ $ export CXXFLAGS="-g -std=c++11 -Wall -pedantic"

And get the same error both ways
Is there anything I am missing, or any other value I should set.

@AndrosovIgor
Copy link

Hi, I have also problem with sqlite3 on raspberry:

log.txt

@alexellis
Copy link

@andreasviglakis @celoyd
I am able to build on Arch Linux... are you two using Raspbian?

@hasael
Copy link
Author

hasael commented Mar 18, 2016

I am running on Raspberry Pi 2 model B. It has 1 GB of RAM. I am using
Raspbian OS
Il giorno 18/mar/2016 18:35, "Alex Ellis" notifications@github.com ha
scritto:

I get issues building on a Raspberry PI due to lack of memory. If you are
using a PI with < 512mb RAM then you must add a 1gb swapfile. I've had the
best experience of building sqlite on Arch Linux and a PI2.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#615 (comment)

@alexellis
Copy link

@elman90 I am able to build on Arch Linux on the PI2.. are you able to give it a shot?

@AndrosovIgor
Copy link

Hi again!

I have resolve this issue with updating my Raspberry to latest OS - RASPBIAN JESSIE (Release date: 2016-03-18) https://www.raspberrypi.org/downloads/raspbian/

Also I install NodeJS (v 4.4.0) in correct way https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

After this manipulations, my application works correctly.

@hasael
Copy link
Author

hasael commented Mar 21, 2016

I will try that out!
Thank you.

2016-03-21 12:28 GMT+01:00 AndrosovIgor notifications@github.com:

Hi again!

I have resolve this issue with updating my Raspberry to latest OS -
RASPBIAN JESSIE (Release date: 2016-03-18)
https://www.raspberrypi.org/downloads/raspbian/ http://url

Also I install NodeJS (v 4.4.0) in correct way
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
http://url

After this manipulations, my application works correctly.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#615 (comment)

@draobrehtom
Copy link

Same problem on RASPBIAN.

@sanchico
Copy link

sanchico commented May 17, 2016

Got the same issue on a Raspberry pi 3 running raspbian Jessie. Solved installing node in the "correct way" indicated by AndrosovIgor. Here is the code so you can save visiting the page:
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs

@talkingtab
Copy link

Regular install worked for me
uname -a Linux raspberrypi 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l GNU/Linux

I added swap space, then

  1. install nvm
  2. nvm install v6.1.0
  3. npm install sqlite3
    It built without problem and ran the sample

@OnixGH
Copy link

OnixGH commented Oct 5, 2016

An alternative solution for those who don't want to upgrade their Raspbian from wheezy to jessie or up: if your GCC is too old (gcc -v gives a version older than 4.8), you can also install gcc 4.8 like this:

https://somewideopenspace.wordpress.com/2014/02/28/gcc-4-8-on-raspberry-pi-wheezy/

This will solve the "This version of node/NAN/v8 requires a C++11 compiler" error (which I got because upgrading Node from 0.10.x to 6.x brought the C++11 requirement).

@leidawt
Copy link

leidawt commented Feb 19, 2017

For user in china, you may try "cnpm install sqlite3", please install cnpm first

@rzr
Copy link
Contributor

rzr commented Apr 10, 2018

About memory requirement check:
#942

About slowness to build:
#597

@springmeyer
Copy link
Contributor

The errors reported here are all various and from different issues. Anyone hitting this please:

  • use latest node-sqlite@4.0.1
  • use latest npm@6
  • create a new issue if you are still having problems

If you are on ARM, we don't support binaries yet for easy install, so see #418

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

10 participants