安装WSL2的ubuntu后,无法安装php8.0和php7.4
1. 运行环境
win11 + WSL2 +Ubuntu +docker desktop
1). 当前使用的 Laravel 版本?
部署环境
//: <> (使用 php artisan --version
命令查看)
2). 当前使用的 php/php-fpm 版本?
PHP 版本:
php-fpm 版本:
3). 当前系统
Windows 11 / Ubuntu 22.4.03 tls / Ubuntu 24.04
4). 业务环境
5). 相关软件版本
2. 问题描述?
在ubuntu中安装php8.0和7.4时,提示
//: <> (代码问题的话,请提供一份最短的,可复现问题的代码。或者相关代码)
:~$ sudo apt install -y php8.0-cli php8.0-dev php8.0-pgsql php8.0-sqlite3 php8.0-gd php8.0-curl php8.0-memcached php8.0-imap php8.0-mysql php8.0-mbstring php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap php8.0-intl php8.0-readline php8.0-msgpack php8.0-igbinary php8.0-ldap php8.0-redis
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.31-0ubuntu9.16) but 2.35-0ubuntu3.4 is to be installed
Depends: libc-dev-bin (= 2.31-0ubuntu9.16) but it is not going to be installed
Depends: libcrypt-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
无法安装libc6提示依赖的包已经安装了,安装了高版本的包
3. 您期望得到的结果?
在Windows的应用商店搜索不到 Ubuntu 20.04LTS,只有高版本的Ubuntu了,怎么样能够安装上php,如果安装其他组件也需要这样的问题,应该如何解决?
//: <> (能截图就截图。)
推荐文章: