Topic: Librairie Expect

Bonjour,

Je souhaite utiliser la librairie Expect, si possible avec PHP 7 (sous Centos 7) mais j'ai vu que cela n'était pas encore possible.
Je me suis donc rabatu sur la version 5.6.22 mais il me semble que la librairie n'y est pas.
Voici mon install:
[root@vmn-dev html]# yum install php56-php-pecl-expect.x86_64
Loaded plugins: fastestmirror, replace
Loading mirror speeds from cached hostfile
* base: mirror.spreitzer.ch
* epel: mirror.spreitzer.ch
* extras: mirror.spreitzer.ch
* remi-safe: remi.schlundtech.de
* updates: mirror.spreitzer.ch
* webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php56-php-pecl-expect.x86_64 0:0.3.3-1.el7.remi will be installed
--> Processing Dependency: php56-php(zend-abi) = 20131226-64 for package: php56-php-pecl-expect-0.3.3-1.el7.remi.x86_64
--> Processing Dependency: php56-php(api) = 20131106-64 for package: php56-php-pecl-expect-0.3.3-1.el7.remi.x86_64
--> Processing Dependency: php56-runtime(remi)(x86-64) for package: php56-php-pecl-expect-0.3.3-1.el7.remi.x86_64
--> Processing Dependency: php56-runtime for package: php56-php-pecl-expect-0.3.3-1.el7.remi.x86_64
--> Running transaction check
---> Package php56-php-common.x86_64 0:5.6.22-1.el7.remi will be installed
--> Processing Dependency: php56-php-pecl-zip(x86-64) for package: php56-php-common-5.6.22-1.el7.remi.x86_64
--> Processing Dependency: php56-php-pecl-jsonc(x86-64) for package: php56-php-common-5.6.22-1.el7.remi.x86_64
---> Package php56-runtime.x86_64 0:2.1-5.el7.remi will be installed
--> Running transaction check
---> Package php56-php-pecl-jsonc.x86_64 0:1.3.9-1.el7.remi will be installed
---> Package php56-php-pecl-zip.x86_64 0:1.13.2-1.el7.remi will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================================================
Package                                                Arch                                    Version                                               Repository                                  Size
=======================================================================================================================================================================================================
Installing:
php56-php-pecl-expect                                  x86_64                                  0.3.3-1.el7.remi                                      remi-safe                                   14 k
Installing for dependencies:
php56-php-common                                       x86_64                                  5.6.22-1.el7.remi                                     remi-safe                                  690 k
php56-php-pecl-jsonc                                   x86_64                                  1.3.9-1.el7.remi                                      remi-safe                                   45 k
php56-php-pecl-zip                                     x86_64                                  1.13.2-1.el7.remi                                     remi-safe                                   43 k
php56-runtime                                          x86_64                                  2.1-5.el7.remi                                        remi-safe                                  1.1 M

Mais dans mon PHPinfo, j'ai bien la version 5.6.22 mais pas la librairie Expect, ni PECL:
http://vmndev.viewmynetwork.ch/jsc.php

Ai-je fait quelque chose de faux ?

Re: Librairie Expect

php56-php-pecl-expect c'est la version SCL, et visiblement, d'après la sortie de yum (puisqu'il a tiré php56-runtime), ce n'est pas la SCL qui est utilisé.

Pour confirmer: rpm -qa php\*

Donc c'est php-pecl-expect qu'il faut installer (depuis "remi-php56")

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Librairie Expect

[root@vmn-dev html]# rpm -qa php\*
php56-php-common-5.6.22-1.el7.remi.x86_64
php56-runtime-2.1-5.el7.remi.x86_64
php56-php-pecl-zip-1.13.2-1.el7.remi.x86_64
php56-php-pecl-expect-0.3.3-1.el7.remi.x86_64
php56-php-pecl-jsonc-1.3.9-1.el7.remi.x86_64
[root@vmn-dev html]#

Le soucis est que lors de l'installation de PECL-expect, la version de php-common revient à la version 5.4.16:
[root@vmn-dev html]# yum install php-pecl-expect
Loaded plugins: fastestmirror, replace
Loading mirror speeds from cached hostfile
* base: mirror.spreitzer.ch
* epel: mirror.euserv.net
* extras: mirror.spreitzer.ch
* remi-safe: remi.schlundtech.de
* updates: mirror.spreitzer.ch
* webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php-pecl-expect.x86_64 0:0.3.3-1.el7.remi.5.4 will be installed
--> Processing Dependency: php(zend-abi) = 20100525-64 for package: php-pecl-expect-0.3.3-1.el7.remi.5.4.x86_64
--> Processing Dependency: php(api) = 20100412-64 for package: php-pecl-expect-0.3.3-1.el7.remi.5.4.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.4.16-36.1.el7_2.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================================================
Package                                           Arch                                     Version                                                  Repository                                   Size
=======================================================================================================================================================================================================
Installing:
php-pecl-expect                                   x86_64                                   0.3.3-1.el7.remi.5.4                                     remi-safe                                    17 k
Installing for dependencies:
php-common                                        x86_64                                   5.4.16-36.1.el7_2.1                                      updates                                     563 k

Transaction Summary

Re: Librairie Expect

Vu la sortie de 'rpm -qa php\*', je n'ai aucune idée d'où vient le PHP installé (en tout cas, pas de chez moi)

which php
rpm -qf $(which php)
rpm -qa \*php\* | sort
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi