PHP mcrypt扩展未正确安装
WARNING
请注意: mcrypt库功能在PHP 7.1中已弃用,已从PHP 7.2🔗中删除。
详细信息
错误可能包括:
exception 'Exception' with message 'PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/mcrypt.so' - /usr/lib/php5/20121212/mcrypt.so: cannot open shared object file: No such file or directory
Installing data fixtures:
/usr/bin/php -f '/Users/username/www/magento/dev/shell/run_data_fixtures.php' -- --bootstrap='MAGE_DIRS[base][path]=/Users/username/www/magento' 2>&1
[ERROR] exception 'Exception' with message '
Fatal error: Uncaught exception 'Exception' with message 'Module 'Magento_Core' depends on 'mcrypt' PHP [extension](https://experienceleague.adobe.com/en/docs/commerce-operations/operational-playbook/glossary#extension) that is not loaded.'
======================================================================
The application has thrown an exception!
======================================================================
Magento\Framework\Exception
Command returned non-zero exit code:
`/usr/bin/php5 -f '/var/www/magento2/dev/shell/run_data_fixtures.php' -- --bootstrap='MAGE_DIRS[base][path]=/var/www/magento2' 2>&1`
描述
特别是在包含独立于操作系统的Linux/Apache/MySQL/PHP (LAMP)“栈栈”的开发人员系统中,可能根本未安装mcrypt,或者它安装在LAMP栈栈的路径中,而不是操作系统的路径中。
因此,Adobe Commerce安装程序无法找到该扩展,并且安装失败。
建议
确定是否通过以下任一方式加载mcrypt扩展:
- 在Web服务器的根目录中设置phpinfo.php文件,并在Web浏览器中检查输出。
- 运行以下命令:
$ php -r "phpinfo();" | grep mcrypt
如果mcrypt是 未安装,则会显示与以下内容类似的消息:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/mcrypt.so' - /usr/lib/php5/20121212/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
在某些情况下,您可能需要从命令行安装Adobe Commerce软件,并指定已安装mcrypt的LAMP栈栈的完整路径。
recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a