Issue
I followed the official installation page for installing .NET 6.0 on Ubuntu 18.04 but I am not able to succeed.
The page told me to do:
wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
And then:
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
I get the following result:
Reading state information... Done
E: Unable to locate package dotnet-sdk-6.0
E: Couldn't find any package by glob 'dotnet-sdk-6.0'
E: Couldn't find any package by regex 'dotnet-sdk-6.0'
When I do "apt search dotnet 6" the package dotnet-sdk-6.0/bionic is shown. But I am not able to install this, I get the same error as before.
I also tried installing with snap. But that is not working either. After giving it the alias dotnet (like was told on the installation page) I get the following: /snap/dotnet-sdk/79/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/79/dotnet: not found
Can somebody please help me with this? Or tell me the reason why it is not working.
Solution
On what architecture are you running your ubuntu 18.04 ?
If you want to use dotnet 6, you also could download the binary file and install it.
Installation inside your home directory.
mkdir ~/.dotnet
cd ~/.dotnet
wget https://download.visualstudio.microsoft.com/download/pr/17b6759f-1af0-41bc-ab12-209ba0377779/e8d02195dbf1434b940e0f05ae086453/dotnet-sdk-6.0.100-linux-x64.tar.gz
tar -xf dotnet-sdk-6.0.100-linux-x64.tar.gz
export PATH="$PATH:$HOME/.dotnet"
rm -rf dotnet-sdk-6.0.100-linux-x64.tar.gz
Answered By - Waytal Answer Checked By - Timothy Miller (WPSolving Admin)