Guten Morgen,
ich habe am Sonntag meine Node Version auf Version 6 aktualisiert und die js-Controller Version auf 1.2.3 seit dem funktioniert der SQLHistory Adaptermit SQLite nicht mehr.
Es kommt der folgende Fehler:
TypeError: Cannot read property 'borrow' of undefined
Selected SQL DB was not installed properly: "sqlite". SQLite requires build tools on system. See README.md
Nun habe ich gelesen, das SQL Lite sich wohl neu kompilieren muss. Hierfür sind wohl laut Readme die Build Tools nötig:
Diese wollte ich wie folgt installieren:
sudo apt-get install build-essential
Die Rückmeldung ist, dass das Paket bereits vorhanden ist.
Daraufhin habe ich den Adapter neu installiert, einmal über Console:
cd /opt/iobroker
iobroker stop sql
npm install iobroker.sql --production
iobroker start sql
als auch über die Admin GUI
Bei letzterer kommen einige Fehler im Installationsprotokoll:
$ ./iobroker add sql
npm install iobroker.sql --production --prefix "/opt/iobroker" (System call)
host.hostname install adapter sql
npm install --production (System call) in "/opt/iobroker/node_modules/iobroker.sql"
npm WARN deprecated sprintf@0.1.5: The sprintf package is deprecated in favor of sprintf-js.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
node-pre-gyp
ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v48-linux-arm.tar.gz node-pre-gyp
ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@6.12.3 (node-v48 ABI) (falling back to source compile with node-gyp)
gyp
WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/6.12.3"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/iobroker/node_modules/iobroker.sql/node_modules/sqlite3/.node-gyp"
make: *** No rule to make target '../.node-gyp/6.12.3/include/node/common.gypi', needed by 'Makefile'. Stop.
gyp
ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/opt/iobroker/node_modules/npm/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Linux 4.9.35-v7+gyp ERR! command "/usr/bin/node" "/opt/iobroker/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/opt/iobroker/node_modules/iobroker.sql/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/opt/iobroker/node_modules/iobroker.sql/node_modules/sqlite3/lib/binding/node-v48-linux-arm"
gyp ERR! cwd /opt/iobroker/node_modules/iobroker.sql/node_modules/sqlite3
gyp ERR! node -v v6.12.3
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
Ich hatte auch versucht das node-gyp Paket händisch zu installieren. Weiß aber nicht welche Version hier gezogen wird:
sudo npm install -g node-gyp
Ist dies ein generelles und bekanntes Problem? Ein Bekannter von mir hat genau das gleiche Problem.
Was kann man tun?
Danke für die Hilfe