[Debian 12] Unable to load dynamic library mosquitto.so?

Salut,

VM debian 12 à jour
Core Alpha 4.4.2 à jour
Plugin Beta à jour

Je précise que ceci n’est que le résultat de ma reprise de test avec Debian 12
Que je n’aie pas les compétences pour juger de l’importance et des impacts de ces logs.

Je suis juste beta :innocent: testeur :wink: :beers:

Voici le log d’install des dépendances

+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_broadlink
+ echo 1
+ echo 2
+ sudo apt update
sudo: unable to resolve host Wooperadeb12: Name or service not known
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x bookworm InRelease
Reading package lists...
Building dependency tree...
Reading state information...
All packages are up to date.
+ echo 3
+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3
sudo: unable to resolve host Wooperadeb12: Name or service not known
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
python3 is already the newest version (3.11.2-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ echo 4
+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-pip
sudo: unable to resolve host Wooperadeb12: Name or service not known
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
python3-pip is already the newest version (23.0.1+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ echo 5
+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-requests
sudo: unable to resolve host Wooperadeb12: Name or service not known
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
python3-requests is already the newest version (2.28.1+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ echo 6
+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-dev
sudo: unable to resolve host Wooperadeb12: Name or service not known
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
python3-dev is already the newest version (3.11.2-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ echo 7
+ sudo apt install -o Dpkg::Options::=--force-confdef -y libudev-dev
sudo: unable to resolve host Wooperadeb12: Name or service not known
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
libudev-dev is already the newest version (252.19-1~deb12u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ echo 8
+ sudo apt install -o Dpkg::Options::=--force-confdef -y python3-serial
sudo: unable to resolve host Wooperadeb12: Name or service not known
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
python3-wxgtk3.0 | python3-wxgtk
The following NEW packages will be installed:
python3-serial
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 89.4 kB of archives.
After this operation, 470 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 python3-serial all 3.5-1.1 [89.4 kB]
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 89.4 kB in 0s (194 kB/s)
Selecting previously unselected package python3-serial.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 98112 files and directories currently installed.)
Preparing to unpack .../python3-serial_3.5-1.1_all.deb ...
Unpacking python3-serial (3.5-1.1) ...
Setting up python3-serial (3.5-1.1) ...
+ echo 9
++ cut -f 2-
++ awk '$1 <= 4'
++ find /usr/local/lib/python3.11/dist-packages/ -mindepth 1 -maxdepth 1 -type d -exec du -ks '{}' +
+ RESULTTODELETE=
++ sed 's, ,\ ,g'
++ echo ''
+ RESULTTODELETE2=
+ xargs rm -rf
+ echo ''
+ echo 10
+ sudo pip3 cache purge
sudo: unable to resolve host Wooperadeb12: Name or service not known
WARNING: No matching packages
Files removed: 0
+ echo 11
+ sudo pip3 install --upgrade pip
sudo: unable to resolve host Wooperadeb12: Name or service not known
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 12
+ sudo pip3 install --force-reinstall --upgrade wheel
sudo: unable to resolve host Wooperadeb12: Name or service not known
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 13
+ sudo pip3 install --force-reinstall --upgrade cryptography==2.6.1
sudo: unable to resolve host Wooperadeb12: Name or service not known
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 14
+ sudo pip3 install --force-reinstall --upgrade pycrypto
sudo: unable to resolve host Wooperadeb12: Name or service not known
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 15
+ sudo pip3 install --force-reinstall --upgrade pyudev
sudo: unable to resolve host Wooperadeb12: Name or service not known
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 16
+ sudo pip3 install --force-reinstall --upgrade asn1crypto
sudo: unable to resolve host Wooperadeb12: Name or service not known
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
+ echo 17
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end broadlink
PHP Warning:  PHP Startup: Unable to load dynamic library 'mosquitto.so' (tried: /usr/lib/php/20220829/mosquitto.so (/usr/lib/php/20220829/mosquitto.so: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/mosquitto.so.so (/usr/lib/php/20220829/mosquitto.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
+ rm /tmp/jeedom_install_in_progress_broadlink
+ echo '*******************End of package installation******************'
*******************End of package installation******************

Je ne comprends pas pourquoi j’ai ça dans les logs

PHP Warning:  PHP Startup: Unable to load dynamic library 'mosquitto.so' (tried: /usr/lib/php/20220829/mosquitto.so (/usr/lib/php/20220829/mosquitto.so: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/mosquitto.so.so (/usr/lib/php/20220829/mosquitto.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Bonjour,
N’aurais tu pas installé jmqtt ou un truc du genre car la le link mosquitto ca vient d’une mauvaise configuration.

Non, c’est une Vm neuve sur laquelle j’ai restauré mon backup de v4.4.2 beta
Voila les plugins installés

Pas de jMqtt

Ya un plugin qui doit installé mosquitto.so (php-mosquitto) je pense et il l’installe pas bien, c’est pas un des plugins que je gere ca c’est sur pour les autres je sais pas.

Ben je ne sais quoi te dire, pour moi mosquitto a été installé par mqtt manager, mqtt discovery se basant dessus

Via mqtt manager je veux bien tester a desinstaller mosquitto et réinstaller et voir

Non non rien a voir avec mqtt manager ou mosquitto lui meme, la c’est un plugin qui a installé l’extension php mosquitto.

Hello,

Tu peux faire une grep -rn 'mosquitto\.so' /var/www/html/plugins stp ?
On va rapidement trouver le/les coupable(s).

Bad

Tu as été plus rapide que moi ^^
J’ai refait la VM debian 12 et remis un backup pour être sur et toujours idem

Du coup j’ai cherché aussi et voilà

root@Jeedom:/# grep -rn 'mosquitto\.so' /var/www/html/plugins
/var/www/html/plugins/fullyKiosK/resources/install.sh:104: echo "> Adding  mosquitto.so to {PHP_CLI_DIR}php.ini"
/var/www/html/plugins/fullyKiosK/resources/install.sh:105: echo "extension=mosquitto.so" | tee -a ${PHP_CLI_DIR}php.ini
/var/www/html/plugins/fullyKiosK/resources/install.sh:113: echo ">Adding mosquitto.so to ${PHP_FPM_DIR}php.ini"
/var/www/html/plugins/fullyKiosK/resources/install.sh:114: echo "extension=mosquitto.so" | tee -a ${PHP_FPM_DIR}php.ini
/var/www/html/plugins/fullyKiosK/resources/install.sh:124: echo ">Adding mosquitto.so to ${PHP_APACHE_DIR}php.ini"
/var/www/html/plugins/fullyKiosK/resources/install.sh:125: echo "extension=mosquitto.so" | tee -a ${PHP_APACHE_DIR}php.ini

J’ai du coup relancé les dépendances de mqqt manager apprès avoir retiré l’appl a moquitto.so dans le php.ini
et c’est ok

+ echo '*******************Begin of package installation******************'
*******************Begin of package installation******************
+ touch /tmp/jeedom_install_in_progress_mqtt2
+ echo 1
+ echo 2
+ sudo apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x bookworm InRelease
Reading package lists...
Building dependency tree...
Reading state information...
All packages are up to date.
+ echo 3
+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x bookworm InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version (12.0-1).
build-essential is already the newest version (12.9).
apt-utils is already the newest version (2.6.1).
git is already the newest version (1:2.39.2-1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[Check Version NodeJS actuelle : v18.19.0 : [  OK  ]
[Check Prefix : /usr/local and sudo prefix : /usr/local and www-data prefix : /usr/local : [  OK  ]
+ echo 4
+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x bookworm InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version (12.0-1).
build-essential is already the newest version (12.9).
apt-utils is already the newest version (2.6.1).
git is already the newest version (1:2.39.2-1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[Check Version NodeJS actuelle : v18.19.0 : [  OK  ]
[Check Prefix : /usr/local and sudo prefix : /usr/local and www-data prefix : /usr/local : [  OK  ]
+ echo 5
+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 https://deb.nodesource.com/node_16.x bookworm InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version (12.0-1).
build-essential is already the newest version (12.9).
apt-utils is already the newest version (2.6.1).
git is already the newest version (1:2.39.2-1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[Check Version NodeJS actuelle : v18.19.0 : [  OK  ]
[Check Prefix : /usr/local and sudo prefix : /usr/local and www-data prefix : /usr/local : [  OK  ]
+ echo 6
+ sudo chmod +x /var/www/html/core/class/../../resources/install_composer.sh
+ sudo /var/www/html/core/class/../../resources/install_composer.sh
Begin installation of composer
--2024-01-24 19:30:55--  https://getcomposer.org/installer
Resolving getcomposer.org (getcomposer.org)... 54.36.53.46, 2001:41d0:302:1100::8:104f
Connecting to getcomposer.org (getcomposer.org)|54.36.53.46|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58167 (57K) [application/octet-stream]
Saving to: 'composer-setup.php'
0K .......... .......... .......... .......... .......... 88% 1.53M 0s
50K ......                                                100% 53.8M=0.03s
2024-01-24 19:30:55 (1.73 MB/s) - 'composer-setup.php' saved [58167/58167]
All settings correct for using Composer
Downloading...
Composer (version 2.6.6) successfully installed to: /var/www/html/core/ajax/composer.phar
Use it: php composer.phar
End installation of composer
+ echo 7
+ cd /var/www/html/core/class/../../plugins/mqtt2/resources/mqtt2d
+ rm -rf node_modules
+ sudo npm install
added 110 packages, and audited 111 packages in 4s
13 packages are looking for funding
run `npm fund` for details
2 moderate severity vulnerabilities
To address all issues, run:
npm audit fix
Run `npm audit` for details.
+ sudo chown -R www-data:www-data jeedom mqtt2d.js node_modules old_node_modules package-lock.json package.json
+ echo 8
+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end mqtt2
Synchronizing state of mosquitto.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mosquitto
+ rm /tmp/jeedom_install_in_progress_mqtt2
+ echo '*******************End of package installation******************'
*******************End of package installation******************

(Peux-tu corriger le log stp, c’est un peu sale tous ces espaces)

Ce que je vois, c’est que lors de l’installation du plugin fullyKiosK, une ligne extension=mosquitto.so est rajoutée dans les 3 php.ini

Donc tous les appels PHP ont maintenant une erreur à cause de cette ligne,
car la lib n’est pas présente sur le système.

C’est fait.

Du coup dois je changer le tag et adresser cela au plugin ?

Alors j’avoue que je n’ai pas suivi le nombre de sujet que tu as ouvert pour ce pb.
J’aurais tendance à dire que tu pourrais identifier celui qui est le plus pertinent et clôturer les autres en le référençant.

Ensuite, regarde quels fichiers ont extension=mosquitto.so dans avec grep -rn mosquitto\.so /etc/ et fait le ménage dedans.

J’ai fait le ménage.
Je cloture les posts

Un post est ouvert pour le plugin qui de toute manière foire en debian 12 core alpha 4.4

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.