我在关注https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/create
当我尝试创建一个项目时,我得到了以下信息:
oskar@oskarslaptop:~/Programming/Resorvoir-CLI$ dotnet new console -o MyApp
Segmentation fault (core dumped)我使用以下命令通过snap安装了dotnet 5.0:
sudo snap install dotnet-sdk --classic --channel=5.0
sudo snap alias dotnet-sdk.dotnet dotnet快照信息:
oskar@oskarslaptop:~/Programming/Resorvoir-CLI$ sudo snap info dotnet-sdk
name: dotnet-sdk
summary: Develop high performance applications in less time, on any platform.
publisher: Microsoft .NET Core (dotnetcore✓)
store-url: https://snapcraft.io/dotnet-sdk
contact: https://dot.net/core
license: unset
description: |
.NET Core is the modular and high performance implementation of .NET for creating web applications
and services that run on Windows, Linux and Mac. It is open source and it can share the same code
with .NET Framework and Xamarin apps.
.NET Core is a .NET Foundation project. https://dotnetfoundation.org/
commands:
- dotnet-sdk.dotnet
snap-id: uHc4y9lWxyqYfxsqcr4xILzAai4L1BHs
tracking: 5.0/stable
refresh-date: today at 13:36 BST
channels:
latest/stable: 5.0.302 2021-07-13 (132) 139MB classic
latest/candidate: ↑
latest/beta: ↑
latest/edge: 5.0.202 2021-04-16 (120) 137MB classic
lts/stable: 3.1.411 2021-07-13 (133) 123MB classic
lts/candidate: ↑
lts/beta: ↑
lts/edge: ↑
6.0/stable: –
6.0/candidate: –
6.0/beta: 6.0.100-preview.6.21355.2 2021-07-14 (134) 144MB classic
6.0/edge: ↑
5.0/stable: 5.0.302 2021-07-13 (132) 139MB classic
5.0/candidate: ↑
5.0/beta: 5.0.100 2020-11-10 (105) 267MB classic
5.0/edge: ↑
3.1/stable: 3.1.411 2021-07-13 (133) 123MB classic
3.1/candidate: ↑
3.1/beta: ↑
3.1/edge: ↑
2.1/stable: 2.1.816 2021-05-11 (124) 245MB classic
2.1/candidate: ↑
2.1/beta: ↑
2.1/edge: 2.1.808 2020-07-14 (91) 245MB classic
installed: 5.0.302 (132) 139MB classic

发布于 2021-11-04 13:03:11
POP操作系统是基于Ubuntu的。如果您通过snap install安装了dotnet运行时,则可以通过"sudo dotnet ...“访问它。只有这样。我在VS代码中也遇到了同样的问题,它在没有sudo的情况下运行dotnet命令,并且我收到了“分段错误(核心转储)”错误。我通过apt-get安装dotnet运行时解决了这个问题(现在安装在"/usr/bin ...“在没有sudo的情况下工作(参见:https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2004-)
发布于 2021-07-25 22:52:22
我认为这就是snap本身的问题所在。使用pacman代替snap
sudo snap remove dotnet-sdk
sudo pacman -S dotnet-sdk有关此问题的更多信息,请单击此处https://github.com/dotnet/sdk/issues/11639
https://stackoverflow.com/questions/68519558
复制相似问题