我通过docker-compose安装了WordPress。它使用php7.3(我已经检查了版本)。现在问题是这样的:wp函数使用Locale类 -> 需要启用php_intl(在php.ini中未找到) -> 尝试安装php7.3-intl -> 出错。
Package php7.3-intl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'php7.3-intl' has no installation candidate
我尝试了这些网站中提到的解决方案:https://computingforgeeks.com/how-to-install-php-7-3-on-debian-9-debian-8/、https://ayesh.me/Ubuntu-PHP-7.2 和 Can't get to install 'intl' extension for php on debian。最终,我在最后一个链接中遇到了以下错误:
/tmp/pear/temp/intl/intl_error.h:24:10: fatal error: ext/standard/php_smart_str.h: No such file or directory
我尝试了
nano /tmp/pear/temp/intl/intl_error.h
,但路径不存在。另外,当被问到Specify where ICU libraries and headers can be found [DEFAULT]
时,我只是按了回车键。接下来该怎么做?或者有更好的方法来解决我的原始问题吗?