NEWS
Raspberrypi install iobroker - node.js 8.12
-
You have to execute "npm rebuild" in /opt/iobroker.
This is what I've done.
And I receive same error messages as shown in my former post
[Update]
nice
now, after one reboot iobroker is dead
pi@ioBroker-Pi:/opt/iobroker $ sudo iobroker start module.js:550 throw err; ^ Error: Cannot find module '/usr/local/www/iobroker/node_modules/iobroker.js-controller/iobroker.js' at Function.Module._resolveFilename (module.js:548:15) at Function.Module._load (module.js:475:25) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) at bootstrap_node.js:625:3now (after iobroker is definately not running I tryed again npm rebuild
so my try was to do chmod 777 /var/lib/dpkg because of the first messages
E: Sperrdatei /var/lib/dpkg/lock konnte nicht geöffnet werden. - open (13: Keine Berechtigung) E: Sperren des Administrationsverzeichnisses (/var/lib/dpkg/) nicht möglich, sind Sie root?but no change. Same errors
next try:sudo apt-get install build-essentialresult:
Paketlisten werden gelesen… Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig build-essential ist schon die neueste Version (12.3). Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt: gyp javascript-common libc-ares2 libhttp-parser2.8 libjs-inherits libjs-jquery libjs-node-uuid libjs-underscore libssl-dev libssl-doc libuv1 libuv1-dev node-abbrev node-ansi node-ansi-color-table node-archy node-async node-balanced-match node-block-stream node-brace-expansion node-builtin-modules node-combined-stream node-concat-map node-cookie-jar node-delayed-stream node-forever-agent node-form-data node-fs.realpath node-fstream node-fstream-ignore node-github-url-from-git node-glob node-graceful-fs node-gyp node-hosted-git-info node-inflight node-inherits node-ini node-is-builtin-module node-isexe node-json-stringify-safe node-lockfile node-lru-cache node-mime node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv node-path-is-absolute node-pseudomap node-qs node-read node-read-package-json node-request node-retry node-rimraf node-semver node-sha node-slide node-spdx-correct node-spdx-expression-parse node-spdx-license-ids node-tar node-tunnel-agent node-underscore node-validate-npm-package-license node-which node-wrappy node-yallist nodejs-doc python-pkg-resources Verwenden Sie »sudo apt autoremove«, um sie zu entfernen. 0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.then again:
npm rebuild sudo npm rebuildboth with same errors.
Maybe I am wrong but i think with sudo I am same as root.
Or not?
Do I have to login as root?
[update]
as root the first errors are gore (lock) but rest is the same.
Then I tryedroot@ioBroker-Pi:/opt/iobroker# apt-get update Holen:1 http://archive.raspberrypi.org/debian stretch InRelease [25,3 kB] Holen:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15,0 kB] OK:3 https://deb.nodesource.com/node_8.x stretch InRelease Holen:4 http://archive.raspberrypi.org/debian stretch/main armhf Packages [199 kB] Holen:5 http://archive.raspberrypi.org/debian stretch/ui armhf Packages [39,2 kB] Es wurden 279 kB in 1 s geholt (198 kB/s). Paketlisten werden gelesen... Fertig root@ioBroker-Pi:/opt/iobroker# apt-get upgrade -y Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig Paketaktualisierung (Upgrade) wird berechnet... Fertig Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt: gyp javascript-common libc-ares2 libhttp-parser2.8 libjs-inherits libjs-jquery libjs-node-uuid libjs-underscore libssl-dev libssl-doc libuv1 libuv1-dev node-abbrev node-ansi node-ansi-color-table node-archy node-async node-balanced-match node-block-stream node-brace-expansion node-builtin-modules node-combined-stream node-concat-map node-cookie-jar node-delayed-stream node-forever-agent node-form-data node-fs.realpath node-fstream node-fstream-ignore node-github-url-from-git node-glob node-graceful-fs node-gyp node-hosted-git-info node-inflight node-inherits node-ini node-is-builtin-module node-isexe node-json-stringify-safe node-lockfile node-lru-cache node-mime node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv node-path-is-absolute node-pseudomap node-qs node-read node-read-package-json node-request node-retry node-rimraf node-semver node-sha node-slide node-spdx-correct node-spdx-expression-parse node-spdx-license-ids node-tar node-tunnel-agent node-underscore node-validate-npm-package-license node-which node-wrappy node-yallist nodejs-doc python-pkg-resources Verwenden Sie »apt autoremove«, um sie zu entfernen. 0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.But iobroker is still dead
-
But you have seen that the path in the error Waage when starting iobroker is wrong?! /var/www/… inhale no idea where this path comes from.
The rebuild log seems ok because authenticate-Pam is an optional package.
Changing rights in system stuff like Dpkg is no good idea!!
Gesendet vom Handy ...
-
Changing rights in system stuff like Dpkg is no good idea!! `
sure. it was only for testingmaybe it is a good idea to reinstall (only) iobroker.
But are these instructions correct?
cd /opt/iobroker sudo chmod 777 * -R sudo npm install iobroker.js-controller --production -
But are these instructions correct? `
They are pretty outdated. See viewtopic.php?f=8&t=19111 and viewtopic.php?f=8&t=19209Since your installation is pretty fucked, I think one of the cleanest ways to get an almost fresh installation is deleting the old node_modules
cd /opt/iobroker sudo rm -rf node_modulesand performing a clean install (while keeping iobroker-data)
curl -sL https://raw.githubusercontent.com/ioBroker/ioBroker/stable-installer/installer.sh | bash -ioBroker should then detect which adapters are missing and install them again.
-
hmmm
pi@ioBroker-Pi:/opt/iobroker $ cd /opt/iobroker pi@ioBroker-Pi:/opt/iobroker $ sudo rm -rf node_modules pi@ioBroker-Pi:/opt/iobroker $ curl -sL https://raw.githubusercontent.com/ioBroker/ioBroker/stable-installer/installer.sh | bash - ========================================================================== Welcome to the ioBroker installer! You might need to enter your password a couple of times. ========================================================================== ========================================================================== Creating ioBroker directory (1/4) ========================================================================== ========================================================================== Downloading installation files (2/4) ========================================================================== npm ERR! code ENOSELF npm ERR! Refusing to install package with name "iobroker" under a package npm ERR! also called "iobroker". Did you name your project the same npm ERR! as the dependency you're installing? npm ERR! npm ERR! For more information, see: npm ERR! <https: docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm="">npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2018-12-06T15_47_56_194Z-debug.log ========================================================================== Installing ioBroker (3/4) ========================================================================== npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) npm WARN deprecated dgram@1.0.1: npm is holding this package for security reasons. As it's a core Node module, we will not transfer it over to other users. You may safely remove the package from your dependencies. npm WARN deprecated nodemailer@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/ npm WARN deprecated mailparser@0.6.2: Mailparser versions older than v2.3.0 are deprecated npm WARN deprecated mailcomposer@2.1.0: This project is unmaintained npm WARN deprecated mimelib@0.3.1: This project is unmaintained npm WARN deprecated buildmail@2.0.0: This project is unmaintained npm ERR! code 128 npm ERR! Command failed: /usr/bin/git submodule update -q --init --recursive npm ERR! fatal: Could not change back to '/root/.npm/_cacache/tmp/git-clone-5787434c': Keine Berechtigung npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-12-06T15_48_43_483Z-debug.log ========================================================================== Finalizing installation (4/4) ========================================================================== ========================================================================== ioBroker was installed successfully Open http://localhost:8081 in a browser and start configuring! ==========================================================================</https:>and after reboot:
pi@ioBroker-Pi:~ $ iobroker start module.js:550 throw err; ^ Error: Cannot find module '/usr/local/www/iobroker/node_modules/iobroker.js-controller/iobroker.js' at Function.Module._resolveFilename (module.js:548:15) at Function.Module._load (module.js:475:25) at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) at bootstrap_node.js:625:3I don't know why there is a call to the webserver