首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在首次使用php、nginx和mysql安装magento 2时解决错误

如何在首次使用php、nginx和mysql安装magento 2时解决错误
EN

Stack Overflow用户
提问于 2022-03-13 23:15:03
回答 1查看 1.1K关注 0票数 0

我正试图通过Ubuntu在我的windows 10机器上安装Magento 2。到目前为止,我已经成功地安装了PHP7.4、MySQL 8.0和NGINX。在安装Magento 2时,我得到以下错误-

代码语言:javascript
复制
An exception was raised while creating "Application"; no instance returned#0 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(1097): Zend\ServiceManager\ServiceManager->createServiceViaCallback()
#1 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(638): Zend\ServiceManager\ServiceManager->createFromFactory()
#2 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(598): Zend\ServiceManager\ServiceManager->doCreate()
#3 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(530): Zend\ServiceManager\ServiceManager->create()
#4 /var/www/html/magento2/vendor/zendframework/zend-mvc/src/Application.php(261): Zend\ServiceManager\ServiceManager->get()
#5 /var/www/html/magento2/lib/internal/Magento/Framework/Console/Cli.php(72): Zend\Mvc\Application::init()
#6 /var/www/html/magento2/bin/magento(24): Magento\Framework\Console\Cli->__construct()
#7 {main}

An exception was raised while creating "Request"; no instance returned#0 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(1097): Zend\ServiceManager\ServiceManager->createServiceViaCallback()
#1 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(638): Zend\ServiceManager\ServiceManager->createFromFactory()
#2 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(598): Zend\ServiceManager\ServiceManager->doCreate()
#3 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(530): Zend\ServiceManager\ServiceManager->create()
#4 /var/www/html/magento2/vendor/zendframework/zend-mvc/src/Application.php(113): Zend\ServiceManager\ServiceManager->get()
#5 /var/www/html/magento2/vendor/zendframework/zend-mvc/src/Service/ApplicationFactory.php(29): Zend\Mvc\Application->__construct()
#6 [internal function]: Zend\Mvc\Service\ApplicationFactory->createService()
#7 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(939): call_user_func()
#8 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(1097): Zend\ServiceManager\ServiceManager->createServiceViaCallback()
#9 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(638): Zend\ServiceManager\ServiceManager->createFromFactory()
#10 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(598): Zend\ServiceManager\ServiceManager->doCreate()
#11 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(530): Zend\ServiceManager\ServiceManager->create()
#12 /var/www/html/magento2/vendor/zendframework/zend-mvc/src/Application.php(261): Zend\ServiceManager\ServiceManager->get()
#13 /var/www/html/magento2/lib/internal/Magento/Framework/Console/Cli.php(72): Zend\Mvc\Application::init()
#14 /var/www/html/magento2/bin/magento(24): Magento\Framework\Console\Cli->__construct()
#15 {main}

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/html/magento2/vendor/zendframework/zend-stdlib/src/ArrayObject.php on line 426#0 /var/www/html/magento2/vendor/composer/ClassLoader.php(571): Magento\Framework\App\ErrorHandler->handler()
#1 /var/www/html/magento2/vendor/composer/ClassLoader.php(571): include()
#2 /var/www/html/magento2/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/html/magento2/vendor/zendframework/zend-stdlib/src/Parameters.php(29): spl_autoload_call()
#5 /var/www/html/magento2/vendor/zendframework/zend-console/src/Request.php(96): Zend\Stdlib\Parameters->__construct()
#6 /var/www/html/magento2/vendor/zendframework/zend-console/src/Request.php(122): Zend\Console\Request->getParams()
#7 /var/www/html/magento2/vendor/zendframework/zend-console/src/Request.php(66): Zend\Console\Request->params()
#8 /var/www/html/magento2/vendor/zendframework/zend-mvc/src/Service/RequestFactory.php(29): Zend\Console\Request->__construct()
#9 [internal function]: Zend\Mvc\Service\RequestFactory->createService()
#10 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(939): call_user_func()
#11 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(1097): Zend\ServiceManager\ServiceManager->createServiceViaCallback()
#12 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(638): Zend\ServiceManager\ServiceManager->createFromFactory()
#13 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(598): Zend\ServiceManager\ServiceManager->doCreate()
#14 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(530): Zend\ServiceManager\ServiceManager->create()
#15 /var/www/html/magento2/vendor/zendframework/zend-mvc/src/Application.php(113): Zend\ServiceManager\ServiceManager->get()
#16 /var/www/html/magento2/vendor/zendframework/zend-mvc/src/Service/ApplicationFactory.php(29): Zend\Mvc\Application->__construct()
#17 [internal function]: Zend\Mvc\Service\ApplicationFactory->createService()
#18 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(939): call_user_func()
#19 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(1097): Zend\ServiceManager\ServiceManager->createServiceViaCallback()
#20 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(638): Zend\ServiceManager\ServiceManager->createFromFactory()
#21 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(598): Zend\ServiceManager\ServiceManager->doCreate()
#22 /var/www/html/magento2/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(530): Zend\ServiceManager\ServiceManager->create()
#23 /var/www/html/magento2/vendor/zendframework/zend-mvc/src/Application.php(261): Zend\ServiceManager\ServiceManager->get()
#24 /var/www/html/magento2/lib/internal/Magento/Framework/Console/Cli.php(72): Zend\Mvc\Application::init()
#25 /var/www/html/magento2/bin/magento(24): Magento\Framework\Console\Cli->__construct()
#26 {main}

我正在遵循链接- https://www.simicart.com/blog/magento-2-nginx/#Step_4_Configure_nginx中提供的指南。在指南中执行步骤7时,我得到了错误。

我试着研究这些错误,但都指向了升级中的一个问题,而这是我第一次安装magento。我继续执行步骤8,但仍然得到了相同的错误集。

EN

回答 1

Stack Overflow用户

发布于 2022-03-15 23:45:18

请您运行这个并粘贴输出好吗?

代码语言:javascript
复制
php -m

我快速地看了一下指南,它似乎并没有告诉您安装Magento 2所需的所有PHP扩展。

指南中有两个不同的步骤#7。如果您被困在第二个命令中,请运行以下命令并在这里发布输出:

代码语言:javascript
复制
sudo systemctl status nginx
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71461588

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档