php - PHP 8 正在运行,但 composer 依赖项需要 >=7 。我的机器已经有 PHP 8.0.3
问题描述
错误图片致命错误:Composer 在您的平台中检测到问题:您的 Composer 依赖项需要 PHP 版本 ">= 7.3.0"。您正在运行 7.1.33-25+ubuntu20.04.1+deb.sury.org+1。
解决方案
我看到你正在使用 Ubuntu 20.04 或 Mint 20.04,
您需要升级当前版本的 PHP,取决于您如何安装所有软件包(LAMP 或单独)
打开Terminal
并使用以下命令:
sudo apt-get update
sudo apt install php7.3 php7.3-common php7.3-cli
之后,依赖项
sudo apt install php7.3-bcmath php7.3-bz2 php7.3-curl php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-readline php7.3-xml php7.3-zip
如果你使用 Apache,你也需要安装它。
apt install libapache2-mod-php7.3
那应该可以解决您的问题,不要忘记重新启动您的 apache2 服务器
sudo service apache2 restart
推荐阅读
- java - TestNG 并行 = 每次运行都会创建新订单
- javascript - 安装 Drivelist 时找不到模块 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin'
- arduino - 在 Arduino Mega 上使用蓝牙触发继电器时出现问题
- flutter - 如何使用 GestureDetector 在卡片上添加飞溅效果
- c# - 当我们应该为视图创建单独的目录时
- ios - iOS - SiriKit 意图扩展 - 看不到打印也看不到断点
- sql - 如何使用 EF6 保存时间值
- internationalization - 在 Hugo 网站上重定向缺失的翻译
- sql - 使用大于和小于比较搜索的 CASE 语句
- python - 如何在Python中提取href内容?