Score:0

Installing .NET SDK on Ubuntu produces no executable dotnet file

jp flag

Installing .NET SDK on Ubuntu 20.04 with the commands listed in the Install .NET on Ubuntu docs:

wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-6.0

produces no dotnet executable.

Command 'dotnet' not found, but can be installed with:

sudo snap install dotnet-sdk

Listing files from the package:

dpkg -L dotnet-sdk-6.0 | grep -P "dotnet$"

gives

/usr/share/dotnet

The /usr/share/dotnet directory contains no executable. I compared this result with my other Ubuntu installation where I installed dotnet ages ago, and there it is installed in /usr/share/dotnet but there exists a /usr/share/dotnet/dotnet executable.

What am I doing wrong? How to install dotnet on Ubuntu with APT?

Using snap is not an option.

waltinator avatar
it flag
Don't prematurely discard diagnostic information. Look at the whole `dpkg -L` output. Can you `apt-cache search dotnet` and install via `apt`?
V0ldek avatar
jp flag
@waltinator `dpkg -L` gives a lot of files, all of in `/usr/share/dotnet`. None of them are executables.
V0ldek avatar
jp flag
@waltinator apt-cache search dotnet gives a bunch of packages in 4 different versions of .NET (2.1, 3.1, 5.0, 6.0). Installing dotnet-sdk-6.0 autoinstalls related packages in 6.0 version. For completion, the other autoinstalled packages are: dotnet-apphost-pack-6.0, dotnet-hostfxr-6.0, dotnet-runtime-6.0, dotnet-runtime-deps-6.0, dotnet-targeting-pack-6.0.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.