core icon indicating copy to clipboard operation
core copied to clipboard

Ubuntu dotnet install fails with "File has unexpected size"

Open russau opened this issue 7 years ago • 41 comments

Problem encountered on https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/sdk-current Operating System: Linux Ubuntu 18.04 - x64

There is something unhappy about the supplied packages-microsoft-prod.deb. I'm sure it was working a few hours ago. I can reproduce it in a docker container. Maybe I just need to wait for a CDN somewhere to update.

$ docker run -it --rm ubuntu:18.04
# apt update ; apt install wget
# wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
# md5sum packages-microsoft-prod.deb
a743911ec6ef33668b61c51947d87ecb  packages-microsoft-prod.deb
# dpkg -i packages-microsoft-prod.deb
# apt update
Get:1 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease [3226 B]
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:4 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages [72.5 kB]
Err:4 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
  File has unexpected size (72463 != 72485). Mirror sync in progress? [IP: 13.91.48.226 443]
  Hashes of expected file:
   - Filesize:72485 [weak]
   - SHA512:c26c6c86803325466bd742789acc9e54a745d045a6b3af1ce26d34e98c9a4904c6873db0cc9b2be7f99385ef6e6237f6e5cd6776fe6c0a1737cae2a67f8566f9
   - SHA256:3fe8d8513549a43d26d917287a5a832d0c577ee62ac37b1daae5aade614dff54
   - SHA1:e2a5cc1ecb44c77caa98eebac08b9d9f4b1e8215 [weak]
   - MD5Sum:30a55059e4b9ef8d02cca7e7acc01cdb [weak]
  Release file created at: Tue, 20 Aug 2019 22:43:21 +0000

russau avatar Aug 21 '19 01:08 russau

Me too, it seems:

Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Get:2 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease [3226 B]
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:6 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages [66.6 kB]
Err:6 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
  File has unexpected size (66537 != 66619). Mirror sync in progress? [IP: 40.76.35.62 443]
  Hashes of expected file:
   - Filesize:66619 [weak]
   - SHA512:4754fea65f57f35fc52e332a6d5cddaf65ea00bbd9e9f428d3a4325c1ac26856190ae82022cdb7a41bf1337e5c7fb1a429933bae9817bacaa8a5186c2aae9f1b
   - SHA256:f971467de90380c9920956be80642d7f6eb0e75042822ea4537d9f5190e13d9f
   - SHA1:0f8e0e8ac649a20ef2029c9f4ffc6bc1ef559257 [weak]
   - MD5Sum:8aa7d0d41b74ea8b84a434a726ea92fa [weak]
  Release file created at: Tue, 20 Aug 2019 22:43:21 +0000
Fetched 3226 B in 3s (1027 B/s)```

robertmaxton42 avatar Aug 21 '19 02:08 robertmaxton42

This was reported over at https://github.com/dotnet/core-setup/issues/7778 as well, and I see it on my machine too. Not closing the issue though--I think it will useful to have this issue active as a signpost for others hitting it until we can get in contact with the repo admins to fix it. /cc @leecow

dagood avatar Aug 21 '19 02:08 dagood

I also encountered this problem.

zhengyiqun avatar Aug 21 '19 03:08 zhengyiqun

Ditto; here's the file info and server IP, in case it helps. Or, even if it doesn't, LOL!

Err:7 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
  File has unexpected size (66537 != 66619). Mirror sync in progress? [IP: 13.91.48.226 443]
  Hashes of expected file:
   - Filesize:66619 [weak]
   - SHA512:4754fea65f57f35fc52e332a6d5cddaf65ea00bbd9e9f428d3a4325c1ac26856190ae82022cdb7a41bf1337e5c7fb1a429933bae9817bacaa8a5186c2aae9f1b
   - SHA256:f971467de90380c9920956be80642d7f6eb0e75042822ea4537d9f5190e13d9f
   - SHA1:0f8e0e8ac649a20ef2029c9f4ffc6bc1ef559257 [weak]
   - MD5Sum:8aa7d0d41b74ea8b84a434a726ea92fa [weak]
  Release file created at: Tue, 20 Aug 2019 22:43:21 +0000
Fetched 255 kB in 1s (342 kB/s)
Reading package lists... Done
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/dists/bionic/main/binary-amd64/Packages.bz2  File has unexpected size (66537 != 66619). Mirror sync in progress? [IP: 13.91.48.226 443]
   Hashes of expected file:
    - Filesize:66619 [weak]
    - SHA512:4754fea65f57f35fc52e332a6d5cddaf65ea00bbd9e9f428d3a4325c1ac26856190ae82022cdb7a41bf1337e5c7fb1a429933bae9817bacaa8a5186c2aae9f1b
    - SHA256:f971467de90380c9920956be80642d7f6eb0e75042822ea4537d9f5190e13d9f
    - SHA1:0f8e0e8ac649a20ef2029c9f4ffc6bc1ef559257 [weak]
    - MD5Sum:8aa7d0d41b74ea8b84a434a726ea92fa [weak]
   Release file created at: Tue, 20 Aug 2019 22:43:21 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

mikeblas avatar Aug 21 '19 04:08 mikeblas

https://packages.microsoft.com/ubuntu/18.04/prod/dists/bionic/main/binary-amd64/Packages.bz2

This is the problem file it's expecting it to be 66619 instead it's 66537

Screenshot from 2019-08-21 01-06-56

DemonRx avatar Aug 21 '19 05:08 DemonRx

Note that the same problem happened before on other Microsoft Debian repositories: https://github.com/microsoft/vscode/issues/66238

leosongwei avatar Aug 21 '19 06:08 leosongwei

Is there any fallback to this, or workaround? Any old(er) archive(s) we can point to?

pollardpj avatar Aug 21 '19 08:08 pollardpj

How can this be escalated to the appropriate team?

rnsc avatar Aug 21 '19 09:08 rnsc

I am experiencing this also.

Hit:1 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                                                    
Get:3 http://eu-west-2.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                                                                             
Get:4 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease [3226 B]                                                    
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease                                      
Get:6 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages [66.6 kB]
Err:6 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
  File has unexpected size (66537 != 66619). Mirror sync in progress? [IP: 13.80.10.205 443]
  Hashes of expected file:
   - Filesize:66619 [weak]
   - SHA512:4754fea65f57f35fc52e332a6d5cddaf65ea00bbd9e9f428d3a4325c1ac26856190ae82022cdb7a41bf1337e5c7fb1a429933bae9817bacaa8a5186c2aae9f1b
   - SHA256:f971467de90380c9920956be80642d7f6eb0e75042822ea4537d9f5190e13d9f
   - SHA1:0f8e0e8ac649a20ef2029c9f4ffc6bc1ef559257 [weak]
   - MD5Sum:8aa7d0d41b74ea8b84a434a726ea92fa [weak]
  Release file created at: Tue, 20 Aug 2019 22:43:21 +0000
Fetched 163 kB in 0s (364 kB/s)                    
Reading package lists... Done
E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/dists/bionic/main/binary-amd64/Packages.bz2  File has unexpected size (66537 != 66619). Mirror sync in progress? [IP: 13.80.10.205 443]
   Hashes of expected file:
    - Filesize:66619 [weak]
    - SHA512:4754fea65f57f35fc52e332a6d5cddaf65ea00bbd9e9f428d3a4325c1ac26856190ae82022cdb7a41bf1337e5c7fb1a429933bae9817bacaa8a5186c2aae9f1b
    - SHA256:f971467de90380c9920956be80642d7f6eb0e75042822ea4537d9f5190e13d9f
    - SHA1:0f8e0e8ac649a20ef2029c9f4ffc6bc1ef559257 [weak]
    - MD5Sum:8aa7d0d41b74ea8b84a434a726ea92fa [weak]
   Release file created at: Tue, 20 Aug 2019 22:43:21 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

rob-glas avatar Aug 21 '19 10:08 rob-glas

Having the same problem.

daniel-melia-crisp avatar Aug 21 '19 10:08 daniel-melia-crisp

Same issue here:

Get:8 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages [72.5 kB]
Err:8 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
  File has unexpected size (72463 != 72485). Mirror sync in progress? [IP: 13.80.10.205 443]
  Hashes of expected file:
   - Filesize:72485 [weak]
   - SHA512:c26c6c86803325466bd742789acc9e54a745d045a6b3af1ce26d34e98c9a4904c6873db0cc9b2be7f99385ef6e6237f6e5cd6776fe6c0a1737cae2a67f8566f9
   - SHA256:3fe8d8513549a43d26d917287a5a832d0c577ee62ac37b1daae5aade614dff54
   - SHA1:e2a5cc1ecb44c77caa98eebac08b9d9f4b1e8215 [weak]
   - MD5Sum:30a55059e4b9ef8d02cca7e7acc01cdb [weak]
  Release file created at: Tue, 20 Aug 2019 22:43:21 +0000

LoicGombeaud avatar Aug 21 '19 11:08 LoicGombeaud

I've the same problem :(

Holen:22 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages [66,6 kB] Fehl:22 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages Datei hat eine unerwartete Größe (66537 != 66619). Eventuell läuft gerade eine Spiegel-Synchronisierung? [IP: 13.80.10.205 443] Hashes of expected file:

  • Filesize:66619 [weak]
  • SHA512:4754fea65f57f35fc52e332a6d5cddaf65ea00bbd9e9f428d3a4325c1ac26856190ae82022cdb7a41bf1337e5c7fb1a429933bae9817bacaa8a5186c2aae9f1b
  • SHA256:f971467de90380c9920956be80642d7f6eb0e75042822ea4537d9f5190e13d9f
  • SHA1:0f8e0e8ac649a20ef2029c9f4ffc6bc1ef559257 [weak]
  • MD5Sum:8aa7d0d41b74ea8b84a434a726ea92fa [weak] Release file created at: Tue, 20 Aug 2019 22:43:21 +0000

mbre777 avatar Aug 21 '19 11:08 mbre777

This should take no more than 1 minute to fix, are the admins asleep?

niklasholm avatar Aug 21 '19 11:08 niklasholm

same issue here:

E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/dists/bionic/main/binary-amd64/Packages.gz File has unexpected size (72463 != 72485). Mirror sync in progress? [IP: 13.80.10.205 443] Hashes of expected file: - Filesize:72485 [weak] - SHA512:c26c6c86803325466bd742789acc9e54a745d045a6b3af1ce26d34e98c9a4904c6873db0cc9b2be7f99385ef6e6237f6e5cd6776fe6c0a1737cae2a67f8566f9 - SHA256:3fe8d8513549a43d26d917287a5a832d0c577ee62ac37b1daae5aade614dff54 - SHA1:e2a5cc1ecb44c77caa98eebac08b9d9f4b1e8215 [weak] - MD5Sum:30a55059e4b9ef8d02cca7e7acc01cdb [weak] Release file created at: Tue, 20 Aug 2019 22:43:21 +0000 E: Some index files failed to download. They have been ignored, or old ones used instead.

leeyuentuen avatar Aug 21 '19 11:08 leeyuentuen

My reluctant workaround for my DockerFile is going to Ubuntu 19.04 , which means:

https://packages.microsoft.com/config/ubuntu/19.04/prod.list

I appreciate this is not really relevant/applicable to most/all, but got me out of a hole.

Fine, problems occur, but, if they're this critical, surely someone should have a 'runbook' of sorts for this kind of thing?

pollardpj avatar Aug 21 '19 11:08 pollardpj

My reluctant workaround for my DockerFile is going to Ubuntu 19.04 , which means:

https://packages.microsoft.com/config/ubuntu/19.04/prod.list

I appreciate this is not really relevant/applicable to most/all, but got me out of a hole.

Fine, problems occur, but, if they're this critical, surely someone should have a 'runbook' of sorts for this kind of thing?

yes, change them to 19.04 can temporarily fix this problem. thanks!

leeyuentuen avatar Aug 21 '19 11:08 leeyuentuen

Workaround:

Manually download the binary https://dotnet.microsoft.com/download/dotnet-core/3.0 ASP.NET Core Binaries: x64 on Ubuntu 18.04 in my case.

Copy the content into a folder on your machine, I use /home/dotnet then run:

sudo cp -a ./dotnet/. /usr/share/dotnet/
sudo chmod +x /usr/share/dotnet/
sudo ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
sudo chmod +x /usr/bin/dotnet

dotnet --info

It was not possible to find any installed .NET Core SDKs Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from: https://aka.ms/dotnet-download Host (useful for support): Version: 3.0.0-preview8-28405-07 Commit: d01b2fb7bc

.NET Core SDKs installed: No SDKs were found.

.NET Core runtimes installed: Microsoft.AspNetCore.App 3.0.0-preview8.19405.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.0.0-preview8-28405-07 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download

Kinkyboo avatar Aug 21 '19 11:08 Kinkyboo

wtf, same issue

ilqvya avatar Aug 21 '19 11:08 ilqvya

Step 7/16 : RUN cd /usr/src/gtest/ && cmake . && make && cp *.a /usr/lib ---> Using cache ---> 312a281e5c9d Step 8/16 : RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - ---> Using cache ---> 32b41bd6d8a9 Step 9/16 : RUN curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list ---> Using cache ---> fc3ad477ce2d Step 10/16 : RUN apt-get update ---> Running in dbb164bc08c0 Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:4 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease [3226 B] Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Hit:6 http://archive.canonical.com/ubuntu bionic InRelease Get:7 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages [72.5 kB] Err:7 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages File has unexpected size (72463 != 72485). Mirror sync in progress? [IP: 13.80.10.205 443] Hashes of expected file:

  • Filesize:72485 [weak]
  • SHA512:c26c6c86803325466bd742789acc9e54a745d045a6b3af1ce26d34e98c9a4904c6873db0cc9b2be7f99385ef6e6237f6e5cd6776fe6c0a1737cae2a67f8566f9
  • SHA256:3fe8d8513549a43d26d917287a5a832d0c577ee62ac37b1daae5aade614dff54
  • SHA1:e2a5cc1ecb44c77caa98eebac08b9d9f4b1e8215 [weak]
  • MD5Sum:30a55059e4b9ef8d02cca7e7acc01cdb [weak] Release file created at: Tue, 20 Aug 2019 22:43:21 +0000 Fetched 255 kB in 2s (125 kB/s) Reading package lists... E: Failed to fetch https://packages.microsoft.com/ubuntu/18.04/prod/dists/bionic/main/binary-amd64/Packages.gz File has unexpected size (72463 != 72485). Mirror sync in progress? [IP: 13.80.10.205 443] Hashes of expected file: - Filesize:72485 [weak] - SHA512:c26c6c86803325466bd742789acc9e54a745d045a6b3af1ce26d34e98c9a4904c6873db0cc9b2be7f99385ef6e6237f6e5cd6776fe6c0a1737cae2a67f8566f9 - SHA256:3fe8d8513549a43d26d917287a5a832d0c577ee62ac37b1daae5aade614dff54 - SHA1:e2a5cc1ecb44c77caa98eebac08b9d9f4b1e8215 [weak] - MD5Sum:30a55059e4b9ef8d02cca7e7acc01cdb [weak] Release file created at: Tue, 20 Aug 2019 22:43:21 +0000 E: Some index files failed to download. They have been ignored, or old ones used instead.

ilqvya avatar Aug 21 '19 11:08 ilqvya

Glad to see I am not the only one with this issue lol. Hopefully Microsoft fixes it pretty soon.

KyleStank avatar Aug 21 '19 12:08 KyleStank