composer install时出现错误Your requirements could not be resolved to an installable set of packages.

composer install时出现错误Your requirements could not be resolved to an installable set of packages.

以下是错误提示:

Problem 1
    - The requested PHP extension ext-tidy * is missing from your system. Install or enable PHP's tidy extension.
  Problem 2
    - Installation request for gathercontent/htmldiff 0.2.1 -> satisfiable by gathercontent/htmldiff[0.2.1].
    - gathercontent/htmldiff 0.2.1 requires ext-tidy * -> the requested PHP extension tidy is missing from your system.

  To enable extensions, verify that they are enabled in your .ini files:
    - /www/server/php/74/etc/php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

应该是tidy扩展没有安装,需要安装tidy扩展。

Cent OS & PHP 7.4 tidy的傻瓜式安装流程

以下依次执行命令即可:

yum install libtidy libtidy-devel -y

注:以下命令中的74为php版本 如需要安装在php5.4版把74改成54即可

cd /www/server/php/74/src/ext/tidy
/www/server/php/74/bin/phpize
./configure --with-php-config=/www/server/php/74/bin/php-config
make && make install
echo "extension = tidy.so" >> /www/server/php/74/etc/php.ini
service php-fpm-74 restart

以上顺序切记不可乱,否则有可能出现安装错误。

如果在实际应用的过程中,有任何问题都可以随时互动。互动的方式有两种,私信或评价

猜你喜欢

转载自blog.csdn.net/virone/article/details/109116107
今日推荐