Most dotnet commands I run on my Ubuntu 20.04 system gives me the error:
Segmentation fault (core dumped)

I tried rerunning the dotnet installation scripts and I tried modifying the stack size with uint -n (as advised on the internet). (It's important to note that I was using the backend of an app on dotnet without any problems, and this error seems to have come out of nowhere.)

I cannot find a solution for this. What can I do to fix this?

The following commands produce the segfault:

  • dotnet -h
  • dotnet --info

The following commands do not produce a segfault:

  • dotnet (without any arguments)
  • dotnet --list-sdks
  • dotnet --list-runtimes

I used the official microsoft documentation from here https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu to install .NET and it ran just fine until a few days ago.

EDIT: Upon further investigation, I found out that if I uninstall the SDK I stop getting the error but as soon as I reinstall, it reapears.

  • 1
    Please don't post screenshots of terminal output - you should edit your question and copy/paste the text from the terminal window.
    – guntbert
    Jul 24 '20 at 22:59
  • Follow @guntbergs advice and also add the commands you used to install it. Make sure to use markdown syntax (see stackoverflow.com/editing-help#code )
    – Garo
    Jul 25 '20 at 0:08
  • You say “Any dotnet command I run … gives me [this] error”, but your screenshot shows otherwise. Jul 25 '20 at 0:41
  • I improved your question but you still have to add the installation commands that you used
    – Garo
    Jul 25 '20 at 0:57
  • Thanks for improving my question :) . I didn't inculde the installation process because I had no problem running the command a few days ago, and I didn't make any important changes to the system that shouldw influenced the sdk. Anyways, I put the official microsoft instalation instructions, as those are what I used. Jul 25 '20 at 8:15

I had this problem using the dotnet installed via snap. I uninstalled and installed directly, via APT. Now it works perfectly. I used the commands from the following link: Dotnet Core

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.