Problème mqtt sur Php 7.3

Tags: #<Tag:0x00007f384f50afd0>

Pour info,
Je rencontre unh problème avec MQTT.
Voici le log:

apparemment la librairie mosquitto.so manque

Début d'installation des dépendances
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version (10.2019051400).
php-pear is already the newest version (1:1.10.6+submodules+notgz-1.1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
--2020-06-07 20:17:59--  http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
Resolving repo.mosquitto.org (repo.mosquitto.org)... 85.119.83.194, 2001:ba8:1f1:f271::2
Connecting to repo.mosquitto.org (repo.mosquitto.org)|85.119.83.194|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3167 (3.1K) [application/octet-stream]
Saving to: 'mosquitto-repo.gpg.key.12'
0K ...                                                   100% 2.54M=0.001s
2020-06-07 20:17:59 (2.54 MB/s) - 'mosquitto-repo.gpg.key.12' saved [3167/3167]
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
Hit:1 http://ftp.fr.debian.org/debian buster InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://ftp.fr.debian.org/debian buster-updates InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
libmosquitto-dev is already the newest version (1.5.7-1+deb10u1).
mosquitto is already the newest version (1.5.7-1+deb10u1).
mosquitto-clients is already the newest version (1.5.7-1+deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
PHP Warning:  PHP Startup: Unable to load dynamic library 'mosquitto.so' (tried: /usr/lib/php/20180731/mosquitto.so (/usr/lib/php/20180731/mosquitto.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/mosquitto.so.so (/usr/lib/php/20180731/mosquitto.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Reading package lists...
Building dependency tree...
Reading state information...
php7.3-dev is already the newest version (7.3.14-1~deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Fin installation des dépendances

C’est un problème du plugin ca, le core de jeedom n’a pas besoin de mosquitto

Merci @Mips,
Oui sans doute, mais c’est un plugin qui a toujours bien fonctionné, ss doute à cause de la php V7.3
Sinon, je viens de "résoudre le problème en installant JMQTT qui, lui, a bien mis a librairie.
Après avoir stoppé JMQTT et activé MQTT, ça tourne !
Loq JMQTT au cas ou ce serait utile:

********************************************************
* Install dependancies                                 *
********************************************************
> Progress file:  /tmp/jeedom/jMQTT/progress_dep.txt
> Install Mosquitto:  1
*
* Update package source repository
*
Reading package lists...
Building dependency tree...
Reading state information...
lsb-release is already the newest version (10.2019051400).
php-pear is already the newest version (1:1.10.6+submodules+notgz-1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
--2020-06-07 21:04:20--  http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
Resolving repo.mosquitto.org (repo.mosquitto.org)... 85.119.83.194, 2001:ba8:1f1:f271::2
Connecting to repo.mosquitto.org (repo.mosquitto.org)|85.119.83.194|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3167 (3.1K) [application/octet-stream]
Saving to: 'mosquitto-repo.gpg.key'
0K ...                                                   100% 2.56M=0.001s
2020-06-07 21:04:21 (2.56 MB/s) - 'mosquitto-repo.gpg.key' saved [3167/3167]
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
*
* Synchronize the package index
*
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://ftp.fr.debian.org/debian buster InRelease
Hit:3 http://ftp.fr.debian.org/debian buster-updates InRelease
Reading package lists...
*
* Install Mosquitto
*
Reading package lists...
Building dependency tree...
Reading state information...
libmosquitto-dev is already the newest version (1.5.7-1+deb10u1).
mosquitto is already the newest version (1.5.7-1+deb10u1).
mosquitto-clients is already the newest version (1.5.7-1+deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
*
* Install php mosquitto wrapper
*
PHP Warning:  PHP Startup: Unable to load dynamic library 'mosquitto.so' (tried: /usr/lib/php/20180731/mosquitto.so (/usr/lib/php/20180731/mosquitto.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/mosquitto.so.so (/usr/lib/php/20180731/mosquitto.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
> Version 7 of PHP detected
> Install php7.3-dev
Reading package lists...
Building dependency tree...
Reading state information...
php7.3-dev is already the newest version (7.3.14-1~deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Install pecl/Mosquitto
PHP Warning:  PHP Startup: Unable to load dynamic library 'mosquitto.so' (tried: /usr/lib/php/20180731/mosquitto.so (/usr/lib/php/20180731/mosquitto.so: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/mosquitto.so.so (/usr/lib/php/20180731/mosquitto.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading Mosquitto-0.4.0.tgz ...
Starting to download Mosquitto-0.4.0.tgz (23,804 bytes)
........done: 23,804 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731
Please provide the prefix of the libmosquitto installation [autodetect] : building in /tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0
running: /tmp/pear/temp/Mosquitto/configure --with-php-config=/usr/bin/php-config --with-mosquitto
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20180731
checking for PHP installed headers prefix... /usr/include/php/20180731
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for mosquitto support... yes, shared
checking for mosquitto files in default path... checking /usr... found in /usr
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/Mosquitto -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/include -I/tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/main -I/tmp/pear/temp/Mosquitto -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/Mosquitto/mosquitto.c -o mosquitto.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/Mosquitto -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/include -I/tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/main -I/tmp/pear/temp/Mosquitto -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/Mosquitto/mosquitto.c  -fPIC -DPIC -o .libs/mosquitto.o
/bin/bash /tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/Mosquitto -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/include -I/tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/main -I/tmp/pear/temp/Mosquitto -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/Mosquitto/mosquitto_message.c -o mosquitto_message.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/Mosquitto -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/include -I/tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/main -I/tmp/pear/temp/Mosquitto -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/Mosquitto/mosquitto_message.c  -fPIC -DPIC -o .libs/mosquitto_message.o
In file included from /usr/include/php/20180731/Zend/zend.h:334,
from /usr/include/php/20180731/main/php.h:34,
from /tmp/pear/temp/Mosquitto/mosquitto_message.c:5:
/tmp/pear/temp/Mosquitto/mosquitto_message.c: In function 'php_mosquitto_message_read_property':
/usr/include/php/20180731/Zend/zend_object_handlers.h:169:2: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
(&std_object_handlers)
^
/tmp/pear/temp/Mosquitto/mosquitto_message.c:292:36: note: in expansion of macro 'zend_get_std_object_handlers'
zend_object_handlers * std_hnd = zend_get_std_object_handlers();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto_message.c: In function 'php_mosquitto_message_write_property':
/usr/include/php/20180731/Zend/zend_object_handlers.h:169:2: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
(&std_object_handlers)
^
/tmp/pear/temp/Mosquitto/mosquitto_message.c:332:36: note: in expansion of macro 'zend_get_std_object_handlers'
zend_object_handlers * std_hnd = zend_get_std_object_handlers();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto_message.c: In function 'php_mosquitto_message_has_property':
/usr/include/php/20180731/Zend/zend_object_handlers.h:169:2: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
(&std_object_handlers)
^
/tmp/pear/temp/Mosquitto/mosquitto_message.c:392:36: note: in expansion of macro 'zend_get_std_object_handlers'
zend_object_handlers * std_hnd = zend_get_std_object_handlers();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/bin/bash /tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/include -I/tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/main -I/tmp/pear/temp/Mosquitto -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -o mosquitto.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/modules  mosquitto.lo mosquitto_message.lo -lmosquitto
libtool: link: cc -shared  -fPIC -DPIC  .libs/mosquitto.o .libs/mosquitto_message.o   -lmosquitto  -g -O2   -Wl,-soname -Wl,mosquitto.so -o .libs/mosquitto.so
libtool: link: ( cd ".libs" && rm -f "mosquitto.la" && ln -s "../mosquitto.la" "mosquitto.la" )
/bin/bash /tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/libtool --mode=install cp ./mosquitto.la /tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/modules
libtool: install: cp ./.libs/mosquitto.so /tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/modules/mosquitto.so
libtool: install: cp ./.libs/mosquitto.lai /tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/modules/mosquitto.la
libtool: finish: PATH="/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/modules
----------------------------------------------------------------------
Libraries have been installed in:
/tmp/pear/temp/pear-build-rootiShRnx/Mosquitto-0.4.0/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
running: make INSTALL_ROOT="/tmp/pear/temp/pear-build-rootiShRnx/install-Mosquitto-0.4.0" install
Installing shared extensions:     /tmp/pear/temp/pear-build-rootiShRnx/install-Mosquitto-0.4.0/usr/lib/php/20180731/
running: find "/tmp/pear/temp/pear-build-rootiShRnx/install-Mosquitto-0.4.0" | xargs ls -dils
57691   4 drwxr-xr-x 3 root root   4096 Jun  7 21:04 /tmp/pear/temp/pear-build-rootiShRnx/install-Mosquitto-0.4.0
57704   4 drwxr-xr-x 3 root root   4096 Jun  7 21:04 /tmp/pear/temp/pear-build-rootiShRnx/install-Mosquitto-0.4.0/usr
57705   4 drwxr-xr-x 3 root root   4096 Jun  7 21:04 /tmp/pear/temp/pear-build-rootiShRnx/install-Mosquitto-0.4.0/usr/lib
57706   4 drwxr-xr-x 3 root root   4096 Jun  7 21:04 /tmp/pear/temp/pear-build-rootiShRnx/install-Mosquitto-0.4.0/usr/lib/php
57707   4 drwxr-xr-x 2 root root   4096 Jun  7 21:04 /tmp/pear/temp/pear-build-rootiShRnx/install-Mosquitto-0.4.0/usr/lib/php/20180731
40736 228 -rwxr-xr-x 1 root root 231808 Jun  7 21:04 /tmp/pear/temp/pear-build-rootiShRnx/install-Mosquitto-0.4.0/usr/lib/php/20180731/mosquitto.so
Build process completed successfully
Installing '/usr/lib/php/20180731/mosquitto.so'
install ok: channel://pecl.php.net/Mosquitto-0.4.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=mosquitto.so" to php.ini
> Reload the web server apache2
********************************************************
*             End dependancy installation              *
********************************************************
1 J'aime

Ok.
J’ai demandé de déplacer dans un autre poste du coup comme ça n’a pas de rapport avec le poste original

Merci beaucoup pour l’astuce qui m’a résolu mon pb :slight_smile:
Pourtant je n’avais aucun de ces deux plugn d’installer JMQTT ou MQTT :slight_smile:
Je peux donc les desinstaller non ? ou il faut du coup les garder ?