Trying to follow the getting started guide https://www.microsoft.com/net/core#ubuntu
When I run sudo apt-get update I get the following
alexis@UbDscTest1:~$ sudo apt-get update
Hit:1 http://gb.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Ign:5 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial InRelease
Ign:6 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial Release
Ign:7 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main amd64 Packages
Ign:8 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main i386 Packages
Ign:9 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main all Packages
Ign:10 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en_GB
Ign:11 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en
Ign:7 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main amd64 Packages
Ign:8 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main i386 Packages
Ign:9 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main all Packages
Ign:10 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en_GB
Ign:11 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en
Ign:7 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main amd64 Packages
Ign:8 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main i386 Packages
Ign:9 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main all Packages
Ign:10 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en_GB
Ign:11 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en
Ign:7 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main amd64 Packages
Ign:8 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main i386 Packages
Ign:9 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main all Packages
Ign:10 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en_GB
Ign:11 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en
Ign:7 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main amd64 Packages
Ign:8 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main i386 Packages
Ign:9 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main all Packages
Ign:10 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en_GB
Ign:11 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en
Err:7 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main amd64 Packages
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Err:8 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main i386 Packages
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Ign:9 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main all Packages
Ign:10 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en_GB
Ign:11 https://apt-mo.trafficmanager.net/repos/dotnet-release xenial/main Translation-en
Reading package lists... Done
W: The repository 'https://apt-mo.trafficmanager.net/repos/dotnet-release xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://apt-mo.trafficmanager.net/repos/dotnet-release/dists/xenial/main/binary-amd64/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
E: Failed to fetch https://apt-mo.trafficmanager.net/repos/dotnet-release/dists/xenial/main/binary-i386/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
E: Some index files failed to download. They have been ignored, or old ones used instead.
Then try running the sudo apt-get install dotnet-dev-1.0.0-preview2-003121 and get the following:
alexis@UbDscTest1:~$ sudo apt-get install dotnet-dev-1.0.0-preview2-003121
[sudo] password for alexis:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dotnet-dev-1.0.0-preview2-003121
E: Couldn't find any package by glob 'dotnet-dev-1.0.0-preview2-003121'
E: Couldn't find any package by regex 'dotnet-dev-1.0.0-preview2-003121'
Not quite sure what I have done wrong, please help.
I can see the release file present here:
https://apt-mo.trafficmanager.net/repos/dotnet-release/dists/xenial/Release
@AlexisColes Can you please run ping apt-mo.trafficmanager.net so we can see which cdn you are hitting?
@chuan FYI
This looks like a potential issue with certs again.
: Failed to fetch https://apt-mo.trafficmanager.net/repos/dotnet-release/dists/xenial/main/binary-amd64/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
alexis@UbDscTest1:~$ ping apt-mo.trafficmanager.net
PING apt-wu.cloudapp.net (191.233.101.77) 56(84) bytes of data.
^C
--- apt-wu.cloudapp.net ping statistics ---
29 packets transmitted, 0 received, 100% packet loss, time 27999ms
@chuan @brthor I'm also failing to ping apt-mo.trafficmanager.net. I am getting redirected to apt-wus.cloudapp.net
, however.
I am also getting same error.. Is there any update on this..? how to resolve it ?
The redirect is expected. apt-mo.trafficmanager.net
redirects to replicated cdns depending on your location.
@piotrpMSFT I am also redirected to apt-wus.cloudapp.net
I'm unable to repro against that endpoint.
Working on a repro against apt-wu
endpoint
I'm unable to obtain a repro here.
@AlexisColes @ramboforever
As a first step, can you ensure the ca-certificates package is installed, and attempt reinstalling if it already is.
apt-get install ca-certificates
apt-get install --reinstall ca-certificates
alexis@UbDscTest1:~$ sudo apt-get install ca-certificates
[sudo] password for alexis:
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates is already the newest version (20160104ubuntu1).
So I have run the reinstall command and it seemed to re-install fine.
However running sudo apt-get update and sudo apt-get install dotnet-dev-1.0.0-preview2-003121 give the same results as before.
However I forgot to mention that we have all external ports closed apart from 80 and 443. Which is why the previous ping did not get a response.
To that end when running the sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 command it failed. I had to run the command sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 as suggested in this issue: https://github.com/dotnet/cli/issues/2189
Any updates on this?
I am also getting the errors on:
E: Unable to locate package dotnet-dev-1.0.0-preview2-003121
E: Couldn't find any package by glob 'dotnet-dev-1.0.0-preview2-003121'
E: Couldn't find any package by regex 'dotnet-dev-1.0.0-preview2-003121'
I walked through the cert install and reinstall. No issues doing that but still cannot find the release to install of dotnet
Is there anything interesting about your ubuntu 16 system?
What packages do you have installed?
Is it a VM, machine installation?
I cannot repro this in an azure VM or docker container.
Windows 10s Linux susbsytem ;)
Welcome to the new and insane world.
Think I know what's going on here @bartelia & @brthor . I've hit the same issue myself, I'm using Linode for my VPS. My VPS has been up and running since the 10.04 days and started out as a i386 machine. I have after that upgraded to every LTS release and along the way I switch the kernel to be x64 sometime ago as well.
Now, the interesting part here is that my apt version tells me it's i386 whereas my kernel is x64. Hence, it will never download the metadata for dotnet core since it has the arch=amd64 tag on it in the sources file, and only supports true x64 systems. See below outputs.
$ apt --version
apt 1.2.12 (i386)
$ uname -a
Linux [RETRACTED] 4.6.5-x86_64-linode71 dotnet/sdk#4284 SMP Fri Jul 29 16:16:25 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
Check your system as well, maybe you've hit the same thing here?
ubuntu 16.04 apt-get update
E: Failed to fetch https://apt-mo.trafficmanager.net/repos/dotnet-release/dists/xenial/InRelease
why?
Still cannot get this thing work... So sad... :(
@ayzhanglei @alzearafat
My solution for this was using http instead of https for this line:
sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
@eldenis
Thank you, but still doesn't work
E: Unable to locate package dotnet-dev-1.0.0-preview2-003131
E: Couldn't find any package by glob 'dotnet-dev-1.0.0-preview2-003131'
E: Couldn't find any package by regex 'dotnet-dev-1.0.0-preview2-003131'
Hey Admin,
How do you expect Linux user (And Ubuntu is the biggest one) to use and love ASP.NET Core, if they even cannot install it.
@eldenis This work for me. Thank you.
@alzearafat I ran sudo apt-get update after @eldenis's script and it worked.
@eldenis Thanks! it works for me.
Seems like this is working for people. And I tried it in a Linux subsystem yesterday and installation worked.
Just came here to say that it does not work with https only with http again.
The issue still present, today ^^
@MichalTaratuta this issue is about a preview version. What is the version you are using and having the problem?
Kali Distribution also appears to have this issue--
ping apt-mo.trafficmanager.net
PING apt-sea-d.cloudapp.net (13.76.190.189) 56(84) bytes of data.
^C
--- apt-sea-d.cloudapp.net ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2015ms
root@kali:~# apt --version
apt 1.0.9.10+kali1~r2u1 for amd64 compiled on Jul 23 2015 17:16:09
Here's what I did to get this working. Based on the current installation instructions (https://www.microsoft.com/net/learn/get-started/linuxubuntu), the guide says to do the following:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
What I did instead is the following:
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
Now, apt
can validate the signatures when I perform apt-get upgrade
.
Had the issue today, this should not be closed.
@d0nutptr 's suggestion worked for me.
@d0nutptr Great Job suggestion worked for me also. Had this issue today I agree with @Rinkink this issue should not be closed.
Most helpful comment
@ayzhanglei @alzearafat
My solution for this was using http instead of https for this line:
sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'