node kann nicht installiert werden

Node-RED als CCU3/RaspberryMatic Addon, WebApp, HomeKit, ...

Moderator: Co-Administratoren

tloeffel
Beiträge: 447
Registriert: 13.09.2017, 05:11
Hat sich bedankt: 1 Mal
Danksagung erhalten: 12 Mal

Re: node kann nicht installiert werden

Beitrag von tloeffel » 22.04.2020, 16:22

Hallo Georg,

super es freut mich !!! Werde Deine Schritte mal in meine Datenbank aufnehmen :-).

Gruß Thomas
972 Kanäle in 165 Geräten: Davon 16 HM, 145 HMIP, 2 Gruppen und 2 CUXD Geräte

Markemark
Beiträge: 1
Registriert: 23.07.2022, 00:03
System: Alternative CCU (auf Basis OCCU)

Re: node kann nicht installiert werden

Beitrag von Markemark » 23.07.2022, 00:37

Hi zusammen,

ich habe eine seit 4 Wochen eine CCU3 und Raspberrymatic auf der CCU3 installiert und möchte eine lokale akustische Ansage von dynamisch erzeugten strings realisieren, ohne cloud, amazon, google etc. einfach bei mir lokal.

ich habe leider auch das Problem, dass speakerpi nicht installiert wird. Hier der Text:


Code: Alles auswählen

2022-07-22T21:53:53.623Z Install : node-red-contrib-speakerpi 0.0.43

2022-07-22T21:53:53.658Z npm install --no-package-lock --global-style --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-speakerpi@0.0.43
2022-07-22T21:54:05.276Z [err] npm
2022-07-22T21:54:05.277Z [err]  ERR! code 1
2022-07-22T21:54:05.278Z [err] npm ERR!
2022-07-22T21:54:05.278Z [err]  path /usr/local/addons/redmatic/var/node_modules/node-red-contrib-speakerpi/node_modules/speaker
2022-07-22T21:54:05.290Z [err] npm ERR!
2022-07-22T21:54:05.291Z [err]  command failed
2022-07-22T21:54:05.291Z [err] npm ERR! command sh -c node-gyp rebuild
2022-07-22T21:54:05.291Z [err] npm ERR!
2022-07-22T21:54:05.291Z [err]  gyp info it worked if it ends with ok
2022-07-22T21:54:05.291Z [err] npm ERR!
2022-07-22T21:54:05.291Z [err]  gyp info using node-gyp@7.1.2
2022-07-22T21:54:05.291Z [err] npm ERR!
2022-07-22T21:54:05.292Z [err]  gyp info using node@14.16.0 | linux | arm64
2022-07-22T21:54:05.292Z [err] npm ERR!
2022-07-22T21:54:05.292Z [err]  gyp ERR! find Python 
2022-07-22T21:54:05.292Z [err] npm ERR!
2022-07-22T21:54:05.292Z [err]  gyp ERR! find Python Python is not set from command line or npm configuration
2022-07-22T21:54:05.292Z [err] npm ERR!
2022-07-22T21:54:05.292Z [err]  gyp ERR! find Python Python is not set from environment variable PYTHON
2022-07-22T21:54:05.292Z [err] npm ERR!
2022-07-22T21:54:05.292Z [err]  gyp ERR! find Python checking if "python3" can be used
2022-07-22T21:54:05.292Z [err] npm ERR!
2022-07-22T21:54:05.293Z [err]  gyp ERR! find Python - "python3" is not in PATH or produced an error
2022-07-22T21:54:05.293Z [err] npm 
2022-07-22T21:54:05.293Z [err] ERR! gyp ERR! find Python checking if "python" can be used
2022-07-22T21:54:05.293Z [err] npm ERR!
2022-07-22T21:54:05.293Z [err]  gyp ERR! find Python - "python" is not in PATH or produced an error
2022-07-22T21:54:05.293Z [err] npm ERR!
2022-07-22T21:54:05.293Z [err]  gyp ERR! find Python checking if "python2" can be used
2022-07-22T21:54:05.293Z [err] npm ERR!
2022-07-22T21:54:05.294Z [err]  gyp ERR! find Python - "python2" is not in PATH or produced an error
2022-07-22T21:54:05.294Z [err] npm ERR!
2022-07-22T21:54:05.294Z [err]  gyp ERR! find Python 
2022-07-22T21:54:05.294Z [err] npm ERR!
2022-07-22T21:54:05.294Z [err]  gyp ERR! find Python **********************************************************
2022-07-22T21:54:05.294Z [err] npm ERR!
2022-07-22T21:54:05.294Z [err]  gyp ERR! find Python You need to install the latest version of Python.
2022-07-22T21:54:05.294Z [err] npm ERR!
2022-07-22T21:54:05.294Z [err]  gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
2022-07-22T21:54:05.294Z [err] npm ERR!
2022-07-22T21:54:05.295Z [err]  gyp ERR! find Python you can try one of the following options:
2022-07-22T21:54:05.295Z [err] npm ERR!
2022-07-22T21:54:05.295Z [err]  gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
2022-07-22T21:54:05.295Z [err] npm ERR!
2022-07-22T21:54:05.295Z [err]  gyp ERR! find Python   (accepted by both node-gyp and npm)
2022-07-22T21:54:05.295Z [err] npm ERR!
2022-07-22T21:54:05.295Z [err]  gyp ERR! find Python - Set the environment variable PYTHON
2022-07-22T21:54:05.295Z [err] npm 
2022-07-22T21:54:05.295Z [err] ERR! gyp ERR! find Python - Set the npm configuration variable python:
2022-07-22T21:54:05.295Z [err] npm 
2022-07-22T21:54:05.296Z [err] ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
2022-07-22T21:54:05.296Z [err] npm 
2022-07-22T21:54:05.296Z [err] ERR! gyp ERR! find Python For more information consult the documentation at:
2022-07-22T21:54:05.296Z [err] npm 
2022-07-22T21:54:05.296Z [err] ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
2022-07-22T21:54:05.296Z [err] npm ERR!
2022-07-22T21:54:05.296Z [err]  gyp ERR! find Python **********************************************************
2022-07-22T21:54:05.296Z [err] npm ERR!
2022-07-22T21:54:05.296Z [err]  gyp ERR! find Python 
2022-07-22T21:54:05.296Z [err] npm ERR!
2022-07-22T21:54:05.297Z [err]  gyp ERR! configure error 
2022-07-22T21:54:05.297Z [err] npm 
2022-07-22T21:54:05.297Z [err] ERR! gyp ERR! stack Error: Could not find any Python installation to use
2022-07-22T21:54:05.297Z [err] npm ERR! gyp ERR! stack     at PythonFinder.fail (/usr/local/addons/redmatic/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:302:47)
2022-07-22T21:54:05.297Z [err] npm
2022-07-22T21:54:05.297Z [err]  ERR! gyp ERR! stack     at PythonFinder.runChecks (/usr/local/addons/redmatic/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
2022-07-22T21:54:05.297Z [err] npm 
2022-07-22T21:54:05.297Z [err] ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/addons/redmatic/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
2022-07-22T21:54:05.297Z [err] npm 
2022-07-22T21:54:05.298Z [err] ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/addons/redmatic/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:266:16)
2022-07-22T21:54:05.298Z [err] npm ERR!
2022-07-22T21:54:05.298Z [err]  gyp ERR! stack     at exithandler (child_process.js:315:5)
2022-07-22T21:54:05.298Z [err] npm ERR!
2022-07-22T21:54:05.298Z [err]  gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:327:5)
2022-07-22T21:54:05.298Z [err] npm ERR!
2022-07-22T21:54:05.298Z [err]  gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
2022-07-22T21:54:05.298Z [err] npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
2022-07-22T21:54:05.299Z [err] npm ERR! gyp ERR! stack     at onErrorNT (internal/child_process.js:465:16)
2022-07-22T21:54:05.299Z [err] npm
2022-07-22T21:54:05.299Z [err]  ERR! gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:80:21)
2022-07-22T21:54:05.299Z [err] npm
2022-07-22T21:54:05.299Z [err]  ERR! gyp ERR! System Linux 5.15.32
2022-07-22T21:54:05.299Z [err] npm
2022-07-22T21:54:05.299Z [err]  ERR! gyp ERR! command "/usr/local/addons/redmatic/bin/node" "/usr/local/addons/redmatic/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2022-07-22T21:54:05.299Z [err] npm 
2022-07-22T21:54:05.299Z [err] ERR! gyp ERR! cwd /usr/local/addons/redmatic/var/node_modules/node-red-contrib-speakerpi/node_modules/speaker
2022-07-22T21:54:05.299Z [err] npm
2022-07-22T21:54:05.300Z [err]  ERR! gyp ERR! node -v v14.16.0
2022-07-22T21:54:05.300Z [err] npm
2022-07-22T21:54:05.300Z [err]  ERR! gyp ERR! node-gyp -v v7.1.2
2022-07-22T21:54:05.300Z [err] npm ERR!
2022-07-22T21:54:05.300Z [err]  gyp ERR! not ok
2022-07-22T21:54:05.362Z [err] 
2022-07-22T21:54:05.364Z [err] npm ERR! A complete log of this run can be found in:
2022-07-22T21:54:05.364Z [err] npm ERR!
2022-07-22T21:54:05.364Z [err]      /usr/local/addons/redmatic/var/npm-cache/_logs/2022-07-22T21_54_05_305Z-debug.log
2022-07-22T21:54:05.450Z rc=1
ich habe den pi via HDMI am TV angeschlossen und über die Konsole auch den Ordner zu _cacahe gelöscht allerdings gibt clean einen fehler aus bzgl. schreibrecht, obwohl ich mount -o,rw vorher ausgeführt hatte, leider kenn ich mich nicht gut genug damit aus um es besser zu beschreiben.
muss ich das alles in root machen? wenn ich libasound installieren will kommt auch "check permission missing write access to /root".

wenn ich

Code: Alles auswählen

npm clean --force
eingebe kommt "npm update check failed"

Die Node instruction sagt man muss sudo apt-get install libasound2-dev auf dem raspberry machen, aber auf der raspberrymatic geht in der KOnsole kein sudo apt-get. (no sudo found).

wenn ich npm install libasound2-dev eingebe code E404 etc

könnt ihr mir bitte helfen?

gerne auch wenn es eine alternative node gibt, allerdings würde ich schon gerne verstehen/lernen, wie man solche Probleme löst.

Grüße

Mark

McPan
Beiträge: 222
Registriert: 29.11.2021, 07:04
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 12 Mal
Danksagung erhalten: 44 Mal

Re: node kann nicht installiert werden

Beitrag von McPan » 23.07.2022, 07:24

Markemark hat geschrieben:
23.07.2022, 00:37
...
ich habe leider auch das Problem, dass speakerpi nicht installiert wird. Hier der Text:
...
Es gibt von Haus aus kein gyp und kein python auf der Raspberrymatic. Raspberrymatic != Debian Stretch/Buster/Bullseye, wo Python mit dabei ist.
Markemark hat geschrieben:
23.07.2022, 00:37
ich habe den pi via HDMI am TV angeschlossen und über die Konsole auch den Ordner zu _cacahe gelöscht allerdings gibt clean einen fehler aus bzgl. schreibrecht, obwohl ich mount -o,rw vorher ausgeführt hatte, leider kenn ich mich nicht gut genug damit aus um es besser zu beschreiben.
muss ich das alles in root machen? wenn ich libasound installieren will kommt auch "check permission missing write access to /root".
Wenn du tatsächlich nur mount -o,rw fehlt dort die Verzeichnisangabe /. Siehe Details in den vorherigen Posts, welche im übrigen 2 Jahre alt sind. Das fällt unter Leichenfledderei. Pfui. Das beschreibare Mounten von / und das Löschen vom npm-Cache hift dir in diesem Fall aber auch nicht weiter.
Markemark hat geschrieben:
23.07.2022, 00:37
Die Node instruction sagt man muss sudo apt-get install libasound2-dev auf dem raspberry machen, aber auf der raspberrymatic geht in der KOnsole kein sudo apt-get. (no sudo found).
wenn ich npm install libasound2-dev eingebe code E404 etc
Es gibt kein sudo auf der Raspberrymatic. Ist in diesem Fall auch überflüssig, da du dort eh schon als user root angemeldet bist.

Es gibt kein apt-get auf der Raspberrymatic. Ist halt kein Debian-basiertes System. Es gibt auch kein yum, dnf, pacman oder yast und wie sie alle heißen. Bei nodes, welche eine Toolchain zum bauen von Binärpaketen oder sonstige Abhängigkeiten von nachzuinstallierenden Binärpaketen benötigen, hast du auf der Rapberrymatic kaum eine Chance, da zu viele Abhängigkeiten dafür fehlen.

Das nicht vorhandene apt-get installiert (Binär-)Pakete aus den Debian-Repositories, npm installiert Pakete aus dem node package repository. Das sind zwei verschiedene Paar Schuhe, die haben nichts miteinander zu tun. apt-get lässt sich nicht durch npm ersetzen.
Markemark hat geschrieben:
23.07.2022, 00:37
könnt ihr mir bitte helfen?

gerne auch wenn es eine alternative node gibt, allerdings würde ich schon gerne verstehen/lernen, wie man solche Probleme löst.
Ich fürchte nein. Wobei, ich will nich ausschließen, dass es Alternativen gibt, die kenne ich aber nicht.
Grüße,
Marco

Elektrische Bauteile funktionieren mit Rauch. Der Beweis: tritt der Rauch aus, funktioniert das Bauteil nicht mehr!
Raspberrymatic @ RPi3b+, HmIP mit RPi-RF-MOD

Antworten

Zurück zu „RedMatic“