Php 抽象工厂无法创建magentoframeworkappdeploymentconfig的实例(别名:Magento\Framework\App\DeploymentConfig)
我在安装magento并在cmd上运行命令时遇到此错误 命令如下:Php 抽象工厂无法创建magentoframeworkappdeploymentconfig的实例(别名:Magento\Framework\App\DeploymentConfig),php,database,magento,magento2,Php,Database,Magento,Magento2,我在安装magento并在cmd上运行命令时遇到此错误 命令如下: php-bin/magento安装程序:安装--base-url=”http://localhost/mage2.4" --db host=“localhost”--db name=“db_mage2.4”--db user=“root”--db password=“”--admin firstname=“admin”--admin lastname=“admin”--admin电子邮件=”user@example.com“-
php-bin/magento安装程序:安装--base-url=”http://localhost/mage2.4" --db host=“localhost”--db name=“db_mage2.4”--db user=“root”--db password=“”--admin firstname=“admin”--admin lastname=“admin”--admin电子邮件=”user@example.com“--admin user=“admin”--admin password=“admin123”--使用rewrites=“1”--后端frontname=“admin”“
我已经解决了这个问题!请检查PHP版本,在我的情况下是php8导致了问题
尝试卸下php8并安装php7.2
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.2
sudo update-alternatives --set php /usr/bin/php7.2
sudo a2enmod php7.2
sudo systemctl restart apache2