在 centOS 上安装 ImageMagick php 扩展导致错误

Installing ImageMagick php extension on centOS results error

好吧,我正在尝试在我的 centOS 服务器上安装 ImageMagick。

出现错误之前我采取的步骤:

# yum install gcc php-devel php-pear

# yum install ImageMagick ImageMagick-devel

# pecl install imagick <-- GIVES ME ERROR

我得到的错误:

Warning: Invalid argument supplied for foreach() in Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Notice: Undefined index: honorsbaseinstall in Role.php on line 180

Notice: Undefined index: honorsbaseinstall in Role.php on line 180

Notice: Undefined index: honorsbaseinstall in Role.php on line 180

Notice: Undefined index: honorsbaseinstall in Role.php on line 180

Notice: Undefined index: honorsbaseinstall in Role.php on line 180

Notice: Undefined index: honorsbaseinstall in Role.php on line 180

Notice: Undefined index: honorsbaseinstall in Role.php on line 180

Notice: Undefined index: honorsbaseinstall in Role.php on line 180

Notice: Undefined index: honorsbaseinstall in Role.php on line 180

Notice: Undefined index: installable in Role.php on line 145

Notice: Undefined index: installable in Role.php on line 145

Notice: Undefined index: installable in Role.php on line 145

Notice: Undefined index: installable in Role.php on line 145

Notice: Undefined index: installable in Role.php on line 145

Notice: Undefined index: installable in Role.php on line 145

Notice: Undefined index: installable in Role.php on line 145

Notice: Undefined index: installable in Role.php on line 145

Notice: Undefined index: installable in Role.php on line 145

Notice: Undefined index: phpfile in Role.php on line 212

Notice: Undefined index: phpfile in Role.php on line 212

Notice: Undefined index: phpfile in Role.php on line 212

Notice: Undefined index: phpfile in Role.php on line 212

Notice: Undefined index: phpfile in Role.php on line 212

Notice: Undefined index: phpfile in Role.php on line 212

Notice: Undefined index: phpfile in Role.php on line 212

Notice: Undefined index: phpfile in Role.php on line 212

Notice: Undefined index: phpfile in Role.php on line 212

Notice: Undefined index: config_vars in Role.php on line 49

Notice: Undefined index: config_vars in Role.php on line 49

Notice: Undefined index: config_vars in Role.php on line 49

Notice: Undefined index: config_vars in Role.php on line 49

Notice: Undefined index: config_vars in Role.php on line 49

Notice: Undefined index: config_vars in Role.php on line 49

Notice: Undefined index: config_vars in Role.php on line 49

Notice: Undefined index: config_vars in Role.php on line 49

Notice: Undefined index: config_vars in Role.php on line 49

Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259

Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 XML Extension not found

谢谢!

请注意在重新安装时使用 php56w 版本的 php pear(而不是现有的 php-pear 包)。简而言之:
1. yum erase php-pear
2. rm -rf /usr/share/pear/
3. yum 安装 php56w-pear