我正在使用Mac Mojave。已安装1.8.4
。作曲者版本composer create-project --prefer-dist cakephp/app test
。尝试使用
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20160303/intl.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/intl.so, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20160303/intl.so in Unknown on line 0
Installing cakephp/app (3.7.1)
- Installing cakephp/app (3.7.1): Loading from cache
Created project in patientcare
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- cakephp/cakephp 3.7.5 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.7.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.7.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.7.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.7.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/cakephp 3.7.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- Installation request for cakephp/cakephp 3.7.* -> satisfiable by cakephp/cakephp[3.7.0, 3.7.1, 3.7.2, 3.7.3, 3.7.4, 3.7.5].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
终端提示错误
intl extension
在Internet上进行了一些研究,我试图启用etc/php.ini
中php文件中的php.ini
以及MAMP文件夹中的{{1}}文件。
我整整一天都被困在这里,无法取得任何进展。
请帮助我。
答案 0 :(得分:1)
您的问题不是扩展未启用(是)。
您的问题是这个
dlopen():找不到文件:/usr/lib/php/extensions/no-debug-non-zts-20160303/intl.so
该路径和/或文件不存在。检查ini中的“ extension_dir”文件夹设置。找到合适的文件夹,并相应地调整“ extension_dir”文件夹设置。
答案 1 :(得分:0)
问题是,通常xammp / mamp / etc倾向于在命令行和Web上使用不同的php.ini文件,因此最好的办法是找出运行{{1}的命令行所使用的文件}。
找到正确的文件后,在此处启用它。您可以检查扩展名是否已加载php -i
。