Installing with `apt install dotnet-sdk-6.0` yields no executable file on Ubuntu 20.04
See original GitHub issueInstalling .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. It’s as if the current download via apt didn’t include any executables.
What am I doing wrong? How to install dotnet
on Ubuntu with APT?
Using snap is not an option.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Installing .NET SDK on Ubuntu produces no executable ...
produces no dotnet executable. Command 'dotnet' not found, but can be installed with: sudo snap install dotnet-sdk. Listing files from the ...
Read more >Installing .NET SDK on Ubuntu produces no executable ...
sudo apt reinstall dotnet-host and then sudo apt install dotnet-sdk-6.0 fixed the issue.
Read more >.NET 6 is now in Ubuntu 22.04 - .NET Blog
NET 6 is now included in Ubuntu 22.04 (Jammy) and can be installed with just `apt install dotnet6`.
Read more >Install .NET SDK or .NET Runtime on Ubuntu 20.04
Demonstrates the various ways to install .NET SDK and .NET Runtime on Ubuntu 20.04.
Read more >Using Rider under Linux: prerequisites
Hi, I'm using Ubuntu 16.04 and I've installed Mono (5.2) and .NET (2.0). I created the sample shown here http://www.mono-project.com/docs/ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s a good catch.
dotnet-host
is indeed installed inapt
even though it doesn’t exist in/usr/share/dotnet
. I did not runrm -rf /usr/share/dotnet
, so I’m guessing something corrupted my/usr/share
at some point, causing this issue. It’s kind of ridiculous that it happened on four different Ubuntus in exactly the same way, but I guess I always tried to keep them synchronised.sudo apt reinstall dotnet-host
and thensudo apt install dotnet-sdk-6.0
fixes the issue. Many thanks.@Moawyah-AbdulRahman, you’ve found an old, closed issue, which aren’t typically monitored for new comments. You should take a look at this, instead, since it appears you’re on Ubuntu 22.04: