使用php7.4创建cakePHP 4时出错

t9aqgxwy  于 2023-11-19  发布在  PHP
关注(0)|答案(1)|浏览(223)

我试图创建一个cakePHP项目,但我得到这个错误。

Problem 1
- cakephp/cakephp 4.0.6 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.5 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.0-beta4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.0-beta3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.0-beta2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.0-beta1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.0-alpha2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.0-alpha1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.0-RC2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.0-RC1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 4.0.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- Installation request for cakephp/cakephp ^4.0 -> satisfiable by cakephp/cakephp[4.0.0, 4.0.0-RC1, 4.0.0-RC2, 4.0.0-alpha1, 4.0.0-alpha2, 4.0.0-beta1, 4.0.0-beta2, 4.0.0-beta3, 4.0.0-beta4, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6].

To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.2/cli/php.ini
- /etc/php/7.2/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.2/cli/conf.d/10-opcache.ini
- /etc/php/7.2/cli/conf.d/10-pdo.ini
- /etc/php/7.2/cli/conf.d/15-xml.ini
- /etc/php/7.2/cli/conf.d/20-calendar.ini
- /etc/php/7.2/cli/conf.d/20-ctype.ini
- /etc/php/7.2/cli/conf.d/20-curl.ini
- /etc/php/7.2/cli/conf.d/20-dom.ini
- /etc/php/7.2/cli/conf.d/20-exif.ini
- /etc/php/7.2/cli/conf.d/20-fileinfo.ini
- /etc/php/7.2/cli/conf.d/20-ftp.ini
- /etc/php/7.2/cli/conf.d/20-gd.ini
- /etc/php/7.2/cli/conf.d/20-gettext.ini
- /etc/php/7.2/cli/conf.d/20-iconv.ini
- /etc/php/7.2/cli/conf.d/20-imap.ini
- /etc/php/7.2/cli/conf.d/20-json.ini
- /etc/php/7.2/cli/conf.d/20-mbstring.ini
- /etc/php/7.2/cli/conf.d/20-mysqli.ini
- /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.2/cli/conf.d/20-pdo_sqlite.ini
- /etc/php/7.2/cli/conf.d/20-phar.ini
- /etc/php/7.2/cli/conf.d/20-posix.ini
- /etc/php/7.2/cli/conf.d/20-readline.ini
- /etc/php/7.2/cli/conf.d/20-shmop.ini
- /etc/php/7.2/cli/conf.d/20-simplexml.ini
- /etc/php/7.2/cli/conf.d/20-sockets.ini
- /etc/php/7.2/cli/conf.d/20-sqlite3.ini
- /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.2/cli/conf.d/20-sysvsem.ini
- /etc/php/7.2/cli/conf.d/20-sysvshm.ini
- /etc/php/7.2/cli/conf.d/20-tokenizer.ini
- /etc/php/7.2/cli/conf.d/20-wddx.ini
- /etc/php/7.2/cli/conf.d/20-xmlreader.ini
- /etc/php/7.2/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.2/cli/conf.d/20-xsl.ini
- /etc/php/7.2/cli/conf.d/20-zip.ini
- /etc/php/7.2/cli/conf.d/zend_extensions_psa.ini

字符串
但是我没有安装php7.2。我用的是php7.4。我现在该怎么办?我用的是Plesk Onyx和Ubuntu 18.04。我在CakePHP文档中找不到任何东西。谢谢你的建议。

xdyibdwo

xdyibdwo1#

在CLI和“Web”环境中安装并启用php intl extension。请注意,您通常有两种不同的php.ini。一种用于CLI(命令行),另一种用于运行在nginx或apache 2之上的“常规”PHP。
更改配置后,请注意重新启动apache 2/ nginx或重新启动服务器,否则您的更改必须生效。

相关问题