j’ai installé ton plugin HIKVISION. Je n’arrive pas à installer les Dépendances.
Je suis RPI 3Bavec jeedom strech 4.0.61.
Voici les logs
> [2020-08-29 20:41:04][INFO] : Arrêt du service hikvision
> [2020-08-29 20:44:59][INFO] : Arrêt du service hikvision
> [2020-08-29 20:49:26][INFO] : Arrêt du service hikvision
> [2020-08-29 20:50:09][DEBUG] : Lancement de : /var/www/html/core/class/../../core/php/jeePlugin.php plugin_id=hikvision function=pre_update callInstallFunction=1
> [2020-08-29 20:50:16][INFO] : Début d'activation du plugin
> [2020-08-29 20:50:16][INFO] : Arrêt du service hikvision
> [2020-08-29 20:50:17][INFO] : Info sur le démon : {"log":"hikvision_node","state":"ok","launchable":"nok","notlaunched":[],"launched":[],"launchable_message":"Gestion automatique d\u00e9sactiv\u00e9e","auto":"0","last_launch":"Inconnue"}
> [2020-08-29 20:50:17][INFO] : Arrêt du service hikvision
> [2020-08-29 20:50:17][DEBUG] : Lancement de : /var/www/html/core/class/../../core/php/jeePlugin.php plugin_id=hikvision function=update callInstallFunction=1
> [2020-08-29 20:50:37][INFO] : Arrêt du service hikvision
> [2020-08-29 20:51:47][INFO] : Arrêt du service hikvision
> [2020-08-29 20:53:21][INFO] : Arrêt du service hikvision
> [2020-08-29 20:53:48][INFO] : Arrêt du service hikvision
> [2020-08-29 20:53:48][DEBUG] : Lancement de : /var/www/html/core/class/../../core/php/jeePlugin.php plugin_id=hikvision function=remove callInstallFunction=1
> [2020-08-29 20:53:52][INFO] : Début d'activation du plugin
> [2020-08-29 20:53:53][INFO] : Info sur le démon : {"launchable_message":"","launchable":"nok","state":"nok","log":"nok","auto":0}
> [2020-08-29 20:53:53][DEBUG] : Lancement de : /var/www/html/core/class/../../core/php/jeePlugin.php plugin_id=hikvision function=install callInstallFunction=1
>
>
> Début de l'installation
> --2020-08-29 18:54:27-- https://raw.githubusercontent.com/lunarok/jeedom_nodejs/master/nodejs.sh
> Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.120.133
> Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.120.133|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 1491 (1.5K) [text/plain]
> Saving to: 'dependencies.sh'
> 0K . 100% 3.04M=0s
> 2020-08-29 18:54:27 (3.04 MB/s) - 'dependencies.sh' saved [1491/1491]
> dependencies.sh: 3: [: /tmp/jeedom/hikvision/dependance: unexpected operator
> Version actuelle : 12
> Hit:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
> Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
> Hit:3 https://deb.nodesource.com/node_12.x stretch InRelease
> Reading package lists...
> Reading package lists...
> Building dependency tree...
> Reading state information...
> lsb-release is already the newest version (9.20161125+rpi1).
> You might want to run 'apt --fix-broken install' to correct these.
> The following packages have unmet dependencies:
> apt-utils : Depends: apt (= 1.4.9) but 1.4.10 is to be installed
> E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
> Ok, version suffisante
> npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
> npm WARN deprecated har-validator@5.1.5: this library is no longer supported
> npm ERR! code 128
> npm ERR! Command failed: git clone --mirror -q https://github.com/Tsopic/hikvision-node-eventSubscribe.git /root/.npm/_cacache/tmp/git-clone-7aad56d2/.git
> npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-7aad56d2/.git'
> npm ERR!
> npm ERR! A complete log of this run can be found in:
> npm ERR! /root/.npm/_logs/2020-08-29T18_54_42_059Z-debug.log
> chown: cannot access 'node_modules': No such file or directory
> Fin de l'installation
pi@raspberrypi:~ $ apt --fix-broken install
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
pi@raspberrypi:~ $
Plusieurs choses ne vont pas, en particulier les droits d’accès sous /root/.npm Interdit à la commande git de créer un sous dossier,
ce qui a pour conséquence de ne pas installer les modules nodejs nécessaires au fonctionnement du plugin.
Début de l'installation
--2020-08-31 06:50:05-- https://raw.githubusercontent.com/lunarok/jeedom_nodejs/master/nodejs.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.120.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.120.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1491 (1.5K) [text/plain]
Saving to: ‘dependencies.sh’
0K . 100% 2.74M=0.001s
2020-08-31 06:50:05 (2.74 MB/s) - ‘dependencies.sh’ saved [1491/1491]
dependencies.sh: 3: [: /tmp/jeedom/hikvision/dependance: unexpected operator
Version actuelle : 12
Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Hit:3 https://deb.nodesource.com/node_12.x stretch InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version (9.20161125+rpi1).
The following package was automatically installed and is no longer required:
libjpeg8
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 121 not upgraded.
Ok, version suffisante
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! code 128
npm ERR! Command failed: git clone --mirror -q https://github.com/Tsopic/hikvision-node-eventSubscribe.git /root/.npm/_cacache/tmp/git-clone-8575e164/.git
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-8575e164/.git'
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-08-31T06_50_31_695Z-debug.log
chown: cannot access 'node_modules': No such file or directory
Fin de l'installation
Pour info, pour me débloquer, j’ai temporairement ouvert les droits sur le dossier root (sudo chmod 777 /root) puis lancé l’installation des dépendances puis remis les droits (sudo chmod 700 /root)
Oui, c’est ça, mais surtout après l’installation des dépendances tu tapes la deuxième commande pour repositionner les droits. Ce n’est qu’un palliatif, je pense que dans certains cas l’installation de nodejs n’est pas correcte et cela provoque ce problème.
chez moi sur le pi, quand j’ouvre les droits ça ne fait rien. je pense qu’il ne s’ouvre pas.
quand je lance les dépendances, j’ai toujours la même erreur.
Début de l'installation
--2020-09-08 19:18:34-- https://raw.githubusercontent.com/lunarok/jeedom_nodejs/master/nodejs.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.120.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.120.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1491 (1.5K) [text/plain]
Saving to: 'dependencies.sh'
0K . 100% 2.01M=0.001s
2020-09-08 19:18:35 (2.01 MB/s) - 'dependencies.sh' saved [1491/1491]
dependencies.sh: 3: [: /tmp/jeedom/hikvision/dependance: unexpected operator
Version actuelle : 12
Hit:1 https://deb.nodesource.com/node_12.x stretch InRelease
Get:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15.0 kB]
Get:3 http://archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
Get:4 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages [11.7 MB]
Fetched 11.7 MB in 47s (244 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version (9.20161125+rpi1).
The following package was automatically installed and is no longer required:
libjpeg8
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 121 not upgraded.
Ok, version suffisante
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! code 1
npm ERR! Command failed: git clone --mirror -q https://github.com/Tsopic/hikvision-node-eventSubscribe.git /root/.npm/_cacache/tmp/git-clone-6eff22a1/.git
npm ERR! /root/.npm/_cacache/tmp/git-clone-6eff22a1/.git: Permission denied
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-09-08T19_20_24_005Z-debug.log
chown: cannot access 'node_modules': No such file or directory
Fin de l'installation
Je rencontre le même soucis.
Pourtant j’ai des droits en 777 sur /root/.npm/_cacache/tmp
J’ai également des droits sudo pour www-data : www-data ALL=(ALL) NOPASSWD: ALL
Avez vous une idée ?
Je suis sur Raspberry 3 avec Raspbian GNU/Linux 10 (buster)