[英]php intl extension missing
我正在使用Mac Mojave。 安裝了MAMP
。 作曲者版本1.8.4
。 當嘗試通過使用在htdocs中創建cakePHP項目時
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.
在Internet上進行了一些研究,我試圖在etc/php.ini
中的php文件中以及MAMP文件夾中的php.ini
文件中啟用intl extension
。
我整整一天都被困在這里,無法取得任何進展。
請幫我。
您的問題不是擴展未啟用(它是)。
您的問題是這樣的:
dlopen():找不到文件:/usr/lib/php/extensions/no-debug-non-zts-20160303/intl.so
該路徑和/或文件不存在。 檢查ini中的“ extension_dir”文件夾設置。 找到正確的文件夾,並相應地調整“ extension_dir”文件夾設置。
問題是通常xammp / mamp / etc傾向於在命令行和Web上使用不同的php.ini文件,因此最好的辦法是找出命令行使用的是哪個文件,並在命令行中運行php -i
。
找到正確的文件后,在此處啟用它。 您可以檢查擴展名是否已加載php -m
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.