Just another IT site ※IT系の記事は当方環境での実施内容となるため実施する場合は自己責任でお願いいたします。At Your Own Risk!! TURN BACK WHILE YOU CAN
PR

【後で調べる】WordPress PHP関連不足モジュール対応(失敗)

※IT系の記事は当方環境での実施内容となるため実施する場合は自己責任でお願いいたします。スクリプトはAI生成のものも多いのでコピー&ペーストの際は文字コードに注意ください!

WordPressの管理画面で不足しているのでできれば入れといた方がと言われているモジュールの追加

警告 オプションのモジュール imagick がインストールされていないか、無効化されています。
警告 オプションのモジュール zip がインストールされていないか、無効化されています。
警告 オプションのモジュール intl がインストールされていないか、無効化されています。
# dnf install php-pear php-devel
Last metadata expiration check: 0:10:12 ago on Fri 11 Jul 2025 11:13:02 AM JST.
Package php-devel-8.0.30-3.el9_6.x86_64 is already installed.
Dependencies resolved.
================================================================================
 Package            Architecture  Version                Repository        Size
================================================================================
Installing:
 php-pear           noarch        1:1.10.14-1.el9        appstream        308 k
Installing dependencies:
 php-process        x86_64        8.0.30-3.el9_6         appstream         40 k

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 348 k
Installed size: 2.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): php-process-8.0.30-3.el9_6.x86_64.rpm     40 kB/s |  40 kB     00:01
(2/2): php-pear-1.10.14-1.el9.noarch.rpm        229 kB/s | 308 kB     00:01
--------------------------------------------------------------------------------
Total                                           200 kB/s | 348 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : php-process-8.0.30-3.el9_6.x86_64                      1/2
  Installing       : php-pear-1:1.10.14-1.el9.noarch                        2/2
  Running scriptlet: php-pear-1:1.10.14-1.el9.noarch                        2/2
  Verifying        : php-pear-1:1.10.14-1.el9.noarch                        1/2
  Verifying        : php-process-8.0.30-3.el9_6.x86_64                      2/2

Installed:
  php-pear-1:1.10.14-1.el9.noarch       php-process-8.0.30-3.el9_6.x86_64

Complete!

# pecl install imagick
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading imagick-3.8.0.tgz ...
Starting to download imagick-3.8.0.tgz (363,874 bytes)
..........................................................................done: 363,874 bytes
33 source files, building
running: phpize
Configuring for:
PHP Api Version:         20200930
Zend Module Api No:      20200930
Zend Extension Api No:   420200930
Please provide the prefix of ImageMagick installation [autodetect] :
building in /var/tmp/pear-build-root9w6WeX/imagick-3.8.0
running: /var/tmp/imagick/configure --with-php-config=/usr/bin/php-config --with-imagick
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 pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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 for system library directory... lib
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 -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking whether to enable the imagick extension... yes, shared
checking for pkg-config... /usr/bin/pkg-config
checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist
checking Testing /usr/bin/MagickWand-config... Doesn't exist
checking Testing /usr/sbin/bin/MagickWand-config... Doesn't exist
checking Testing /opt/bin/MagickWand-config... Doesn't exist
checking Testing /opt/local/bin/MagickWand-config... Doesn't exist
checking Testing /opt/homebrew/bin/MagickWand-config... Doesn't exist
configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
ERROR: `/var/tmp/imagick/configure --with-php-config=/usr/bin/php-config --with-imagick' failed


# pecl install zip
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading zip-1.22.6.tgz ...
Starting to download zip-1.22.6.tgz (369,556 bytes)
............................................................................done: 369,556 bytes
24 source files, building
running: phpize
Configuring for:
PHP Api Version:         20200930
Zend Module Api No:      20200930
Zend Extension Api No:   420200930
building in /var/tmp/pear-build-roottKeCJM/zip-1.22.6
running: /var/tmp/zip/configure --with-php-config=/usr/bin/php-config
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 pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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 for system library directory... lib
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 -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking for zip archive read/write support... yes, shared
checking for libzip... yes
checking PHP version... 8.0
checking for pkg-config... /usr/bin/pkg-config
checking for libzip... not found
configure: error: Please reinstall the libzip distribution
ERROR: `/var/tmp/zip/configure --with-php-config=/usr/bin/php-config' failed

# pecl install intl
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading intl-3.0.0.tgz ...
Starting to download intl-3.0.0.tgz (248,200 bytes)
....................................................done: 248,200 bytes
150 source files, building
running: phpize
Configuring for:
PHP Api Version:         20200930
Zend Module Api No:      20200930
Zend Extension Api No:   420200930
Specify where ICU libraries and headers can be found [DEFAULT] :
building in /var/tmp/pear-build-rootmerCQY/intl-3.0.0
running: /var/tmp/intl/configure --with-php-config=/usr/bin/php-config --with-icu-dir=DEFAULT
configure: WARNING: unrecognized options: --with-icu-dir
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 pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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 for system library directory... lib
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 -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking whether to enable internationalization support... yes, shared
checking for icu-uc >= 50.1 icu-io icu-i18n... no
configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:

Package 'icu-uc', required by 'virtual:world', not found
Package 'icu-io', required by 'virtual:world', not found
Package 'icu-i18n', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ICU_CFLAGS
and ICU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
ERROR: `/var/tmp/intl/configure --with-php-config=/usr/bin/php-config --with-icu-dir=DEFAULT' failed

peclでうまく入らないのはperlのCPANと似てますね。であれば、同じようにdnfで入れてみる

# dnf install php-intl
Last metadata expiration check: 2:21:23 ago on Fri 11 Jul 2025 11:13:02 AM JST.
Dependencies resolved.
================================================================================
 Package    Arch     Version                                  Repository   Size
================================================================================
Installing:
 php-intl   x86_64   8.3.19-1.module+el9.6.0+32042+808943ae   appstream   167 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 167 k
Installed size: 590 k
Is this ok [y/N]: y
Downloading Packages:
php-intl-8.3.19-1.module+el9.6.0+32042+808943ae 177 kB/s | 167 kB     00:00
--------------------------------------------------------------------------------
Total                                           120 kB/s | 167 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : php-intl-8.3.19-1.module+el9.6.0+32042+808943ae.x86_   1/1
  Running scriptlet: php-intl-8.3.19-1.module+el9.6.0+32042+808943ae.x86_   1/1
  Verifying        : php-intl-8.3.19-1.module+el9.6.0+32042+808943ae.x86_   1/1

Installed:
  php-intl-8.3.19-1.module+el9.6.0+32042+808943ae.x86_64

Complete!

# dnf install php-imagick
Last metadata expiration check: 2:21:35 ago on Fri 11 Jul 2025 11:13:02 AM JST.
Error:
 Problem: package php-pecl-imagick-3.7.0-1.el9.x86_64 from epel requires php(api) = 20200930-64, but none of the providers can be installed
  - package php-pecl-imagick-3.7.0-1.el9.x86_64 from epel requires php(zend-abi) = 20200930-64, but none of the providers can be installed
  - conflicting requests
  - package php-common-8.0.30-3.el9_6.x86_64 from appstream is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Updates to PHP 8.1 – does not install – Virtualmin – Virtualmin Community

php7.2からphp8.1へアップデート

CentOSでPHPのImageMagickラッパーライブラリ、PECL::imagickを入れてWebPで出力してみる #Imagick – Qiita

【画像処理ソフト】ImageMagick と Imagick インストールに関する備忘録的な何か | 株式会社ビヨンド

最終的にはこちらの方法でで解決した模様

Install ImageMagick on Rocky Linux 9 | CentLinux

#dnf install ImageMagick ImageMagick-devel
#dnf install -y php-devel php-pear make
#pecl install imagick
#echo "extension=imagick.so" > /etc/php.d/20-imagick.ini
#systemctl restart httpd php-fpm
#php -m | grep imagick

 

タイトルとURLをコピーしました