Problème install dépendances version stable du 13 juin

Et bien c’est étonnant que les dépendances ne passent pas dans ce cas

Effectivement

Du coup je viens de retester la commande en sudo -u www-data est voici le resultat :
WARNING: The directory ‹ /var/www/.cache/pip › or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

Je n’ai pas de dossier .cache

Tu peux vérifier la commande que tu as tapé, ce n’est probablement pas celle que j’ai mis plus haut

/var/www/html/plugins/jMQTT# sudo -u www-data resources/jmqttd/venv/bin/pip3 freeze --no-color -r resources/python-requirements/requirements.txt 2>&1 >/dev/null

WARNING: The directory '/var/www/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Au temps pour moi, merci pour ce retour.
Je fais quelques tests demain et reviens vers toi.

Ok merci !
Je viens de vérifier dans le plugin, j’ai ajouté une log debug et j’ai bien le même message.

Tu peux regarder les droits qu’il y a sur le dossier et les fichiers du répertoire /var/www avec un ls -la /var/www/ stp ?

Il est possible que les droits sur ce rep ne soient pas ceux définis par défaut par Jeedom.

Chez moi j’ai sur mes différents systèmes :

bad@jeedom:~$ ls -la /var/www/
total 16
drwxrwxr-x  4 root     root     4096 Feb 27 20:24 .
drwxr-xr-x 12 root     root     4096 Aug 14  2021 ..
drwxrwxr-x 19 www-data www-data 4096 Jun 15 10:30 html
drwxrwxr-x  2 www-data www-data 4096 Dec 31  2019 .ssh

Bonjour @Bad,

J’ai les mêmes soucis que @Micka41.

Lorsque j’exécute ta commande, j’ai le résultat suivant :

pi@pi-elec:~ $ ls -la /var/www/
total 12
drwxrwxr-x  3 root     root     4096 May 30 10:45 .
drwxr-xr-x 12 root     root     4096 May 30 10:45 ..
drwxrwxr-x 18 www-data www-data 4096 Jun 15 11:30 html

Ok, entre temps j’ai plus d’infos sur le pb, ça vient en effet de pip qui essaye de créer un dossier .cache dans /var/www/ sur lequel il n’a pas les droits, mais je n’arrive pas à reproduire sur mon système.

Je vais regarder pour désactiver ce cache si ça n’a pas trop d’impact ou sinon le forcer le répertoire du cache de pip dans le repertoire de jMQTT.

@Micka41,

Est-ce que tu veux bien tester la modification suivante sur ton système ?

Remettre le test que tu as enlevé précédemment dans jMQTT.class.php
Rajouter --no-cache-dir, dans ces deux fichiers, de la façon suivante :

------------------------- core/class/jMQTT.class.php --------------------------
@@ -1248,1 +1248,1 @@
-		elseif (exec(dirname(__FILE__) . '/../../resources/jmqttd/venv/bin/pip3 freeze --no-color -r '.dirname(__FILE__) . '/../../resources/python-requirements/requirements.txt 2>&1 >/dev/null | wc -l') > 0) {
+		elseif (exec(dirname(__FILE__) . '/../../resources/jmqttd/venv/bin/pip3 freeze --no-cache-dir --no-color -r '.dirname(__FILE__) . '/../../resources/python-requirements/requirements.txt 2>&1 >/dev/null | wc -l') > 0) {

--------------------------- resources/install_apt.sh ---------------------------
@@ -65,1 +65,1 @@
-try sudo -u www-data $BASEDIR/jmqttd/venv/bin/pip3 install -r $BASEDIR/python-requirements/requirements.txt
+try sudo -u www-data $BASEDIR/jmqttd/venv/bin/pip3 install --no-cache-dir -r $BASEDIR/python-requirements/requirements.txt

Les dépendances devraient être vu comme OK suite à cette modif.

L’exécution de la commande donne le resultat attendu, je fais un test dans le plugin.

1 « J'aime »

Plugin OK !

Merci !

Parfait, je passe la modif en beta et en stable.
Merci encore

@Domochip, tu peux forcer la synchro sur le Market Jeedom une fois que c’est fait ?

@dmoal, @turriert, @blablatus, pouvez-vous me confirmer que la nouvelle stable a règlé vos problèmes ?

1 « J'aime »

Bonjour,

Version stable installée hier soir… pas de soucis ! J’ai relancé une installation des dépendances pour vérifier, et ça fonctionne nickel ! Le plugin est de nouveau UP !

Merci beaucoup pour votre aide et surtout votre ré activité !

1 « J'aime »

Bonjour. Je viens d’installer la nouvelle version. Après avoir réinstallé les dépendances, tout a fonctionné parfaitment. Merci beaucoup.

1 « J'aime »

Merci pour le correctif.
Tout fonctionne normalement

1 « J'aime »

Bonjour.
Merci pour le correctif!
Cependant, depuis la dernière mise à jour, et même après la correctif, il existe toujours une erreur me concernant, et les dépendances ne peuvent pas être installées.

La version installé de Jeedom est v4.2.18 et de jMQTT v2022-06-15 20:59:26.

Log Debug jMQTT_dep :

======================================================================
== 16/06/2022 23:45:03 == Dependencies installation for jMQTT
======================================================================
== Should install Mosquitto: 1
[  5% ] : Synchronize the package index...
[  9% ] : Synchronize the package index : [  OK  ]
[ 10% ] : Install Mosquitto...
[ 19% ] : Install Mosquitto : [  OK  ]
[ 20% ] : Install Composer...
[ 24% ] : Install Composer : [  OK  ]
[ 25% ] : Install Ratchet PHP library...
[ 29% ] : Install Ratchet PHP library : [  OK  ]
[ 30% ] : Temporary fix of Ratchet PHP library (https://github.com/ratchetphp/RFC6455/pull/65)...
[ 34% ] : Temporary fix of Ratchet PHP library (https://github.com/ratchetphp/RFC6455/pull/65) : [  OK  ]
[ 35% ] : Install JsonPath-PHP library...
[ 39% ] : Install JsonPath-PHP library : [  OK  ]
[ 40% ] : Remove Composer...
[ 49% ] : Remove Composer : [  OK  ]
[ 50% ] : Install python3 venv and pip debian packages...
[ 59% ] : Install python3 venv and pip debian packages : ERROR
[ 60% ] : Create a python3 Virtual Environment...
[ 69% ] : Create a python3 Virtual Environment : ERROR
[ 70% ] : Install required python3 libraries in venv...
[ 89% ] : Install required python3 libraries in venv : ERROR
[ 90% ] : Run post_dependancy_install function...
[ 99% ] : Run post_dependancy_install function : [  OK  ]
[100% ] : Finished !
======================================================================
== KO == Installation Error
======================================================================
== ANALYSING ERRORS...
== NO KNOWN ERROR DETECTED
== Error in step : Install python3 venv and pip debian packages
== Line 59
== Command `sudo DEBIAN_FRONTEND=noninteractive apt-get install -y python3-venv python3-pip' have an issue
== Return code is 100
== Error message :
Reading package lists...
Building dependency tree...
Reading state information...
Package python3-venv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python3-venv' has no installation candidate
======================================================================
== Error in step : Create a python3 Virtual Environment
== Line 62
== Command `sudo -u www-data python3 -m venv /var/www/html/plugins/jMQTT/resources/jmqttd/venv' have an issue
== Return code is 1
== Error message :
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt-get install python3-venv
You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.
Failing command: ['/var/www/html/plugins/jMQTT/resources/jmqttd/venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']
======================================================================
== Error in step : Install required python3 libraries in venv
== Line 65
== Command `sudo -u www-data /var/www/html/plugins/jMQTT/resources/jmqttd/venv/bin/pip3 install --no-cache-dir -r /var/www/html/plugins/jMQTT/resources/python-requirements/requirements.txt' have an issue
== Return code is 1
== Error message :
sudo: /var/www/html/plugins/jMQTT/resources/jmqttd/venv/bin/pip3: command not found
======================================================================

J’ai bien essayé de réaliser la commande indiquée, en sudo

sudo apt-get install python3-venv

Mais j’obtient ce message:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-venv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python3-venv' has no installation candidate

Voici ci-dessous des informations qui vous seront utiles:


J’utilise la Python 3.7.3

Suivant les indications présentées ici, la commande suivante:

sudo apt-get update
sudo apt-get install python3.7-venv

me donne un résultat identique:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3.7-venv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python3.7-venv' has no installation candidate

alors que

sudo apt-get install python3-virtualenv

me donne

Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-virtualenv is already the newest version (15.1.0+ds-2+deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.

Quelqu’un a-t-il une idée ou suggestion?
Merci beaucoup de votre aide!

Hello, quelle est ta version de debian ?

Salut @nebz!
Ma version de debian est la suivante:

Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster