C
C#3w ago
yourFriend

How to install dotnet runtime and sdks on debian virtual machine?

This should be simple like: 1. Add appropriate repository 2. Then sudo apt install But I'm not able to add repository. I tried sudo apt-add-repository https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb It shows following errors: 1. 403 Forbidden 2. 404 Not Found I'm new to linux
7 Replies
Angius
Angius3w ago
Install .NET on Debian - .NET
Learn about which versions of .NET SDK and .NET Runtime are supported, and how to install .NET on Debian.
yourFriend
yourFriendOP3w ago
Thanks I end up manually downloading it from https://dotnet.microsoft.com/en-us/download/dotnet/8.0 I works as intended but I am not able to set it as system wide environment variable. I tried adding its path to /etc/environment like this DOTNET_ROOT="/home/user/directory_where_i_have_downloaded_dotnet_runtime" But it still shows dotnet: command not found if I type dotnet in any directory other than the one where it is present.
Microsoft
Download .NET 8.0 (Linux, macOS, and Windows)
.NET 8.0 downloads for Linux, macOS, and Windows. .NET is a free, cross-platform, open-source developer platform for building many different types of applications.
Angius
Angius3w ago
DOTNET_ROOT is just an env var that, IIRC, dotnet itself uses You need to add that dir to PATH
yourFriend
yourFriendOP3w ago
PATH="/home/user/directory_where_i_have_downloaded_dotnet_runtime" Like this?
Angius
Angius3w ago
Ideally without replacing your existing PATH
yourFriend
yourFriendOP3w ago
Thanks it worked out I had to add path in /etc/profile

Did you find this page helpful?