• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved How to install YAML extension in PHP 7.2

onlinesolutions

Basic Pleskian
I am getting the following result, despite the fact that libyaml is installed.

[root@odin ~]# /opt/plesk/php/7.2/bin/pecl install yaml
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading yaml-2.0.4.tgz ...
Starting to download yaml-2.0.4.tgz (39,071 bytes)
..........done: 39,071 bytes
8 source files, building
running: phpize
Configuring for:
PHP Api Version: 20170718
Zend Module Api No: 20170718
Zend Extension Api No: 320170718
Please provide the prefix of libyaml installation [autodetect] :
building in /tmp/pear-build-rootSp5Am6/yaml-2.0.4
running: /tmp/yaml/configure --with-php-config=/opt/plesk/php/7.2/bin/php-config --with-yaml
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/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-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /opt/plesk/php/7.2
checking for PHP includes... -I/opt/plesk/php/7.2/include/php -I/opt/plesk/php/7.2/include/php/main -I/opt/plesk/php/7.2/include/php/TSRM -I/opt/plesk/php/7.2/include/php/Zend -I/opt/plesk/php/7.2/include/php/ext -I/opt/plesk/php/7.2/include/php/ext/date/lib
checking for PHP extension directory... /opt/plesk/php/7.2/lib64/php/modules
checking for PHP installed headers prefix... /opt/plesk/php/7.2/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.14.3 (ok)
checking for gawk... gawk
checking whether to enable LibYAML suppot... yes, shared
checking for yaml headers... not found
configure: error: Please install libyaml
ERROR: `/tmp/yaml/configure --with-php-config=/opt/plesk/php/7.2/bin/php-config --with-yaml' failed
[root@odin ~]#
 
Just install libyaml-devel additionally:

# yum install libyaml-devel

and then repeat module installation.
 
Back
Top