[software development] dotnet SDK/runtime安装不了
Tofloor
poster avatar
Mr.b.Xu
deepin
2025-11-19 22:23
Author

想试用dotnet 10在deepin上如何运行。去微软官网下载了,按照其方法安装,无法成功。

以前在ubuntu上是可以安装dotnet SDK/runtime的,并且是可以直接运行dotnet console app.

Reply Favorite View the author
All Replies
kuangxj
deepin
2025-11-19 23:01
#1

https://dotnet.microsoft.com/zh-cn/download/dotnet/thank-you/sdk-10.0.100-linux-x64-binaries

安装 SDK

下载完成后,打开终端并运行以下命令以提取 SDK 并使这些命令在终端上可用。

Terminal

mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-10.0.100-linux-x64.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
前面的命令只会使 .NET SDK 命令可用于运行它的终端会话。                   
可以编辑 shell 配置文件来永久添加命令。存在多个不同的 shell 可用于 Linux,并且每个 shell 都有不同的配置文件。例如:                   
  • Bash Shell: ~/.bash_profile, ~/.bashrc

  • Korn Shell: ~/.kshrc or .profile

  • Z Shell: ~/.zshrc or .zprofile

    编辑 shell 的相应源文件,并将 `:$HOME/dotnet` 添加到现有 `PATH` 语句的末尾。如果不包含 `PATH` 语句,则使用 `export PATH=$PATH:$HOME/dotnet` 添加一个新行。                 
    
    此外,将 `export DOTNET_ROOT=$HOME/dotnet` 添加到文件末尾。
    
Reply View the author
新手小白
deepin
2025-11-20 09:41
#2

快回ubuntu吧,你只会遇到更多的问题,deepin特有的问题

Reply View the author
Mr.b.Xu
deepin
2025-11-20 10:13
#3

微软的这个文章https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian?tabs=dotnet10

误导了我去使用命令行:sudo apt-get update &&
sudo apt-get install -y dotnet-sdk-10.0

这个命令不能安装成功。

使用这个方法就可成功:

https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-10.0.100-linux-x64-binaries

Reply View the author
gadfly3173
deepin
2025-11-20 11:02
#4
新手小白

快回ubuntu吧,你只会遇到更多的问题,deepin特有的问题

这不是deepin特有问题啊,只要不是微软自己写了文档的那几个,要通过源安装都是要调一下的,微软那个文档只写了debian本体安装的方法。ubuntu的dotnet sdk也不是微软维护的,是ubuntu自己打包维护的。微软不知道发什么疯,把libicu74从依赖列表里删了才装不上的。

Reply View the author
gadfly3173
deepin
2025-11-20 11:32
#5

帮你提了个issue,https://github.com/dotnet/runtime/issues/121829 ,或者也可以期待deepin把libicu76加到源里

Reply View the author