Error at installing on Raspberry Pi
#1
Hello,

I'm trying to install Gekko on an clean raspberry pi jessi, but get some errors.
The Rapi is up-to-date and i have install extr nodejs but when in use the command:

Code:
pi@raspberrypi:~/gekko $ npm install --only=production

I get net next error log:
Code:
> websocket@1.0.24 install /home/pi/gekko/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/home/pi/gekko/node_modules/websocket/build'
 CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
 SOLINK_MODULE(target) Release/obj.target/bufferutil.node
 COPY Release/bufferutil.node
 CXX(target) Release/obj.target/validation/src/validation.o
 SOLINK_MODULE(target) Release/obj.target/validation.node
 COPY Release/validation.node
make: Leaving directory '/home/pi/gekko/node_modules/websocket/build'

> sqlite3@3.1.11 install /home/pi/gekko/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.11/node-v59-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.11 and node@9.3.0 (node-v59 ABI) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/gekko/node_modules/sqlite3/build'
 ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
 TOUCH Release/obj.target/deps/action_before_build.stamp
 CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o
 AR(target) Release/obj.target/deps/sqlite3.a
 COPY Release/sqlite3.a
 CXX(target) Release/obj.target/node_sqlite3/src/database.o
In file included from ../../nan/nan.h:192:0,
                from ../src/database.h:10,
                from ../src/database.cc:4:
../../nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
../../nan/nan_maybe_43_inl.h:112:73: warning: ‘v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated: Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
  return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
                                                                        ^
In file included from /home/pi/.node-gyp/9.3.0/include/node/v8.h:26:0,
                from /home/pi/.node-gyp/9.3.0/include/node/node.h:63,
                from ../../nan/nan.h:49,
                from ../src/database.h:10,
                from ../src/database.cc:4:
/home/pi/.node-gyp/9.3.0/include/node/v8.h:3115:29: note: declared here
                Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
                            ^
/home/pi/.node-gyp/9.3.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
  declarator __attribute__((deprecated(message)))
  ^~~~~~~~~~
../src/database.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE node_sqlite3::Database::New(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/database.cc:133:96: error: no matching function for call to ‘v8::Object::ForceSet(v8::Local<v8::String>, v8::Local<v8::String>, v8::PropertyAttribute)’
    info.This()->ForceSet(Nan::New("filename").ToLocalChecked(), info[0].As<String>(), ReadOnly);
                                                                                               ^
In file included from /home/pi/.node-gyp/9.3.0/include/node/v8.h:26:0,
                from /home/pi/.node-gyp/9.3.0/include/node/node.h:63,
                from ../../nan/nan.h:49,
                from ../src/database.h:10,
                from ../src/database.cc:4:
/home/pi/.node-gyp/9.3.0/include/node/v8.h:3115:29: note: candidate: v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)
                Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
                            ^
/home/pi/.node-gyp/9.3.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
  declarator __attribute__((deprecated(message)))
  ^~~~~~~~~~
/home/pi/.node-gyp/9.3.0/include/node/v8.h:3115:29: note:   no known conversion for argument 3 from ‘v8::PropertyAttribute’ to ‘v8::Local<v8::Value>’
                Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
                            ^
/home/pi/.node-gyp/9.3.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
  declarator __attribute__((deprecated(message)))
  ^~~~~~~~~~
../src/database.cc:134:86: error: no matching function for call to ‘v8::Object::ForceSet(v8::Local<v8::String>, Nan::imp::IntegerFactory<v8::Int32>::return_t, v8::PropertyAttribute)’
    info.This()->ForceSet(Nan::New("mode").ToLocalChecked(), Nan::New(mode), ReadOnly);
                                                                                     ^
In file included from /home/pi/.node-gyp/9.3.0/include/node/v8.h:26:0,
                from /home/pi/.node-gyp/9.3.0/include/node/node.h:63,
                from ../../nan/nan.h:49,
                from ../src/database.h:10,
                from ../src/database.cc:4:
/home/pi/.node-gyp/9.3.0/include/node/v8.h:3115:29: note: candidate: v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)
                Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
                            ^
/home/pi/.node-gyp/9.3.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
  declarator __attribute__((deprecated(message)))
  ^~~~~~~~~~
/home/pi/.node-gyp/9.3.0/include/node/v8.h:3115:29: note:   no known conversion for argument 3 from ‘v8::PropertyAttribute’ to ‘v8::Local<v8::Value>’
                Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
                            ^
/home/pi/.node-gyp/9.3.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
  declarator __attribute__((deprecated(message)))
  ^~~~~~~~~~
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginOpen(node_sqlite3::Database::Baton*)’:
../src/database.cc:144:9: warning: unused variable ‘status’ [-Wunused-variable]
    int status = uv_queue_work(uv_default_loop(),
        ^~~~~~
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginClose(node_sqlite3::Database::Baton*)’:
../src/database.cc:230:9: warning: unused variable ‘status’ [-Wunused-variable]
    int status = uv_queue_work(uv_default_loop(),
        ^~~~~~
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginExec(node_sqlite3::Database::Baton*)’:
../src/database.cc:525:9: warning: unused variable ‘status’ [-Wunused-variable]
    int status = uv_queue_work(uv_default_loop(),
        ^~~~~~
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginLoadExtension(node_sqlite3::Database::Baton*)’:
../src/database.cc:625:9: warning: unused variable ‘status’ [-Wunused-variable]
    int status = uv_queue_work(uv_default_loop(),
        ^~~~~~
node_sqlite3.target.mk:113: recipe for target 'Release/obj.target/node_sqlite3/src/database.o' failed
make: *** [Release/obj.target/node_sqlite3/src/database.o] Error 1
make: Leaving directory '/home/pi/gekko/node_modules/sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:159:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Linux 4.9.59-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/gekko/node_modules/sqlite3/lib/binding/node-v59-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/pi/gekko/node_modules/sqlite3/lib/binding/node-v59-linux-arm"
gyp ERR! cwd /home/pi/gekko/node_modules/sqlite3
gyp ERR! node -v v9.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/gekko/node_modules/sqlite3/lib/binding/node-v59-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/pi/gekko/node_modules/sqlite3/lib/binding/node-v59-linux-arm' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/pi/gekko/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:159:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:943:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Linux 4.9.59-v7+
node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/gekko/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/gekko/node_modules/sqlite3
node-pre-gyp ERR! node -v v9.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.37
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/gekko/node_modules/sqlite3/lib/binding/node-v59-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/pi/gekko/node_modules/sqlite3/lib/binding/node-v59-linux-arm' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@3.1.11 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@3.1.11 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2018-01-04T19_38_06_383Z-debug.log

Is there something i have forgot to install?
  Reply
#2
Normally you don't need to compile sqlite yourself as prebuild binaries can be downloaded. Could you try the following? First try out this installing `build-essential` as described here: https://github.com/mapbox/node-sqlite3/i...-255671179 ?

If that doesn't work, can you try again with the nodejs LTS (version 8.9.4)?
  Reply
#3
(01-04-2018, 07:46 PM)phoenix-blue Wrote: Hello,

I'm trying to install Gekko on an clean raspberry pi jessi, but get some errors.
The Rapi is up-to-date and i have install extr nodejs but when in use the command:

Is there something i have forgot to install?

I had also lots of trouble with the raspberry pi (i played around with both zero-w and rpi3)  on raspian stretch lite. Especially SQLite was a huge struggle.  eventually i used this to get it working (i think) by this
Code:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y git
sudo git clone git://github.com/askmike/gekko.git
cd gekko
sudo npm install --only=production

sudo npm install -g node-pre-gyp
sudo npm install sqlite --unsafe-perm

Hope it helps you  , i'm just a linux noob so don't shoot me 

Jan
  Reply
#4
Hi, 

I have did some test and the solution was the nodejs.
The new 9.x is somewhere different then the 8.x.
After removing version 9 and install version 8 the errors are gone.

Thanks!
  Reply
#5
i have isseus with importing data from binance it shows IMPORT ERROR: Child peocess has died
  Reply
#6
I have pm2 & gekko running on a headless RPi3; however, I haven't done anything beyond importing data and setting up API. Here are the steps I took, I actually wrote them down in case I had to redo it all. I am using latest Raspbian lite installed from an img using etcher. Also, I ran apt-get update and apt-get upgrade immediately. Hope what follow helps. Sorry for poor formatting, copy/paste from evernote caused problems.


  1. Install nodejs and npm (https://www.raspberrypi.org/forums/viewt...p?t=141770)
    1. curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
      1. 6.x is latest verstion, but should be replaced by current version if available
    2. sudo apt-get install nodejs -y
  2. Install git
    1. sudo apt-get install git
  3. Install gekko
    1. git clone git://github.com/askmike/gekko.git
    2. cd gekko
  1. Install gekko dependencies
    1. npm install --only=production
  2. Start gekko 
    1. node gekko --ui  (must be in ~/gekko) OR node /filepath/gekko --ui (from anywhere)
If you want to use pm2, do following BEFORE starting gekko, but after everything else:

  1. Install pm2
    1. sudo npm install pm2@latest -g
  2. Run gekko (from ~/gekko)
    1. pm2 start /file path to folder/gekko -- --ui   (the first -- sends next option to app.js)
  3. Run pm2 at startup
    1. pm2 startup
  4. Save process incase of restart
    1. pm2 save
  Reply
#7
[SOLVED] >>SQLITE3<< ERROR by rick_rolled
WOW this is it..!
Thanks alot.

After 3 days of sqlite3 Error i tryed yours. yes worked
Raspi 3b Headless/VNC Viewer

The sqlite3 could not be found but was rebuild. Nice.

Success the first Import is working. Thumbs up!
Backtesting also works
  Reply
#8
I've followed everything in this post but I'm getting the same error. I cannot import, gekko throws an error. I believe it's the same sqlite3 error.

I have build essential 12.3, nodejs 8.9.

pi@raspberrypi:~ $ sudo npm i -g sqlite3 --unsafe-perm

> sqlite3@3.1.13 install /usr/lib/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws....arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@8.9.4 (node-v57 ABI) (falling back to source compile with node-gyp)
make: Entering directory '/usr/lib/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o
  Reply
#9
(02-18-2018, 02:22 PM)gward Wrote: I've followed everything in this post but I'm getting the same error.  I cannot import, gekko throws an error.  I believe it's the same sqlite3 error.

I have build essential 12.3, nodejs 8.9.

pi@raspberrypi:~ $ sudo npm i -g sqlite3 --unsafe-perm

> sqlite3@3.1.13 install /usr/lib/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws....arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@8.9.4 (node-v57 ABI) (falling back to source compile with node-gyp)
make: Entering directory '/usr/lib/node_modules/sqlite3/build'
 ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
 TOUCH Release/obj.target/deps/action_before_build.stamp
 CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o

I fixed it.  I run gekko on Windows 10 lol.  I think there's an issue with node 8.9 and most current sqlite on raspian.
  Reply


Forum Jump:


Users browsing this thread: