【dotnet】Ubuntu 24.04安装dotnet 8.0报错

我的环境是Ubuntu 24.04,64位,使用azure的虚拟机。

报错文字如下:

bash 复制代码
kidfu@azurefu:~$ sudo apt install dotnet-sdk-8.0
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:
 dotnet-runtime-deps-8.0 : Depends: libicu but it is not installable or
                                    libicu72 but it is not installable or
                                    libicu71 but it is not installable or
                                    libicu70 but it is not installable or
                                    libicu69 but it is not installable or
                                    libicu68 but it is not installable or
                                    libicu67 but it is not installable or
                                    libicu66 but it is not installable or
                                    libicu65 but it is not installable or
                                    libicu63 but it is not installable or
                                    libicu60 but it is not installable or
                                    libicu57 but it is not installable or
                                    libicu55 but it is not installable or
                                    libicu52 but it is not installable
E: Unable to correct problems, you have held broken packages.

在github上找到了修复方式,并且我自己也成功了。

运行如下代码:

bash 复制代码
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
相关推荐
遇见火星3 小时前
Ubuntu Docker 容器化部署教程
linux·ubuntu·docker
ybb_ymm4 小时前
mysql8在linux下的默认规则修改
linux·运维·数据库·mysql
半梦半醒*4 小时前
zabbix安装
linux·运维·前端·网络·zabbix
Panda__Panda5 小时前
docker项目打包演示项目(数字排序服务)
运维·javascript·python·docker·容器·c#
xx.ii5 小时前
Docker监控
运维·docker·容器
板鸭〈小号〉6 小时前
Socket网络编程(2)-command_server
运维·服务器
维尔切6 小时前
Docker 存储与数据共享
运维·docker·容器
温柔一只鬼.6 小时前
Docker快速入门——第四章Docker镜像
运维·docker·容器
温柔一只鬼.7 小时前
Docker快速入门——Windowns系统下Docker安装(2025最新理解与完整,附带WSL1如何升级为WSL2)
运维·docker·容器
武文斌777 小时前
复习总结最终版:单片机
linux·单片机·嵌入式硬件·学习