9
votes

I followed the instruction from this link.

$ sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
$ sudo apt-get update

Then while I run this command:

$ sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177

I get the following error:

E: Unable to locate package dotnet-dev-1.0.0-preview2.1-003177

E: Couldn't find any package by regex 'dotnet-dev-1.0.0-preview2.1-003177'

Please help!

3

3 Answers

3
votes

I just checked the repository pool and found they have changed their naming convention. In your above command the package name has been entered incorrectly:

dotnet-dev-1.0.0-preview2.1-003177

Where it should be:

dotnet-dev-1.0.0-preview2-1-003177

Notice the - instead of the .. If this is the issue then it is either a mistyped tutorial on the Microsoft site or a change in their naming scheme that hasn't been reflected everywhere.

2
votes

You need to install HTTPS transport layer security for the apt-get application. The .NET Core repos are https, that is why they are not updated along with the other packages.

Simply type in the terminal

sudo apt-get install apt-transport-https

and your

sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177

should work like a charm! (at least it did for me)

I'd leave this in a comment, or upvote the other comment that mentioned this fix, but because I am new I am not allowed to do any of those things. I just wanted to confirm that that fix worked for me.

1
votes

make sure you don't get any errors while updating the package list. I had to install apt-transport-https before executing sudo apt-get update.