-1

So i have just installed Ubuntu (Minumal Installation) on Virtual Box Mac. I cant install any software form apt. It gives me error saying

E: Unable to locate package cmatrix

i have had this problem before and fixed it by somehow updating snapd (I deleted the vm). Now when i try to do that it gives me an error. then it goes away. But nothing channged. I have also tried sudo apt update but it fails

E: some index files failed to download

Edit: i tried the How do I restore the default repositories? and it did nothing

heres the new full error message

note: i made this change before but it seemed to not have saved because it was back to nz.archive.ubuntu.com

E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/restricted/source/by-hash/SHA256/e4c92ef2e003ed3264e76c7df048b5b635c595c5ce10680b3f89761a01695ff1  File has unexpected size (13183 != 6472). Mirror sync in progress? [IP: 91.189.88.152 80]
   Hashes of expected file:
    - Filesize:6472 [weak]
    - SHA256:e4c92ef2e003ed3264e76c7df048b5b635c595c5ce10680b3f89761a01695ff1
    - SHA1:57fab19d8cee8a3feaf7c84420350094f9937785 [weak]
    - MD5Sum:55c93c10aa16a7e26010fa7bd55c7294 [weak]
   Release file created at: Thu, 23 Apr 2020 17:33:17 +0000
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/universe/binary-i386/by-hash/SHA256/a00e79d71544f34be89543e090ccafce943577e1a1b997780c07bb75766750b3  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/universe/dep11/by-hash/SHA256/7c5810c7adbacd42400848d09af06dad52ce4597b16f9e7fa36141375f40da24  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/universe/dep11/by-hash/SHA256/52805f5b7237153f9b4173b0bfe51917175eff5ca0f9feeb6d4dfcdd88918f70  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/universe/dep11/by-hash/SHA256/b8a6c70d793758b8e231f5b901156049aa562872fd9df0a807ca3c9df6556d16  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/universe/cnf/by-hash/SHA256/ba4c9cf04162b981885818b1e3b415f841680ff60c1e647adbdd545ab1e7d17b  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/restricted/binary-i386/by-hash/SHA256/cd98f05f351d05500deef4311554710cf9bc1c39a61f198bd4733cafc9a38c98  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/multiverse/binary-i386/by-hash/SHA256/b504fbe86bb3a8ade20fcffcfc9036c732ab5f198c40d5a6a5a5685d20058966  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/multiverse/binary-amd64/by-hash/SHA256/233757b7df68e16c18ccad612ff13a8bb68fc36ac6d35f13427cafd70d8b5d42  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/multiverse/i18n/by-hash/SHA256/224cafd684a26e8bce3dfca4daf33b853c9273d13e4ada6161ce9ef38f1a567c  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/multiverse/dep11/by-hash/SHA256/d3eb7ca9f47c55f0031d59664a1b53f03ce3461ad565e3e568e00ff5a41f4fc3  
E: Some index files failed to download. They have been ignored, or old ones used instead.
joe
  • 1
  • We can't read the error messages except those you provided; the "some index files failed to download" is a summary with the purpose of getting you to read earlier messages that contain errors. As you didn't provide the actual errors (only summary), we can currently only tell you to read the error messages (and provide them if you'd like help from us). The package cmatrix (cmatrix | 2.0-2 | focal/universe | source, amd64, arm64, armhf, ppc64el, riscv64, s390x) is in 'universe' so did you enable it? – guiverc May 04 '21 at 04:08
  • @guiverc i just installed a fresh vm it should be on by default. but the universe repo not bieng enbaled shouldn't cause the sudo apt update to fail – joe May 05 '21 at 01:41
  • You'll have to read the error messages, as you've provided only the final summary (that informs you to read further up the listing for the actual error message) I cannot provide any clue as I can only read messages you posted (and you gave only final summary details, not the actual error messages) – guiverc May 05 '21 at 01:53
  • i fixed it now. – joe May 05 '21 at 01:55
  • You're using the Free Software Mirror Group mirror, (https://launchpad.net/ubuntu/+archivemirrors) the clue was the sync in progress? message, so either try again later OR use a Ubuntu/Canonical site instead of mirror. – guiverc May 05 '21 at 01:55
  • i am sorry what do you mean (i am new to ubuntu) – joe May 05 '21 at 01:57
  • Key is http://nz.archive.ubuntu.com/ubuntu is not a Ubuntu archive, you're using a mirror (ping the address and you'll note see where the reply is from.... this is general networking detail and not Ubuntu specific). From that detail I looked up the site I provided (list of mirrors) and got the name in my prior comment.. By removing the "nz." you'll use a Canonical/Ubuntu site (instead of [country] mirror) which can be done by editor, package management tool etc... minimal means usually vi or like text editor is easiest. The only Ubuntu specific detail was the mirror list link I provided – guiverc May 05 '21 at 02:02
  • so do i edit the sources.list file and remove nz? – joe May 05 '21 at 03:35
  • Have you tried again? If it was a sync error as the message suggested, usually it's gone in a few mins to few hours anyway (depending on mirror being used & their policies).. but yeah removing "nz." would switch you to a Canonical/Ubuntu archive site (instead of country mirror which was hosted by Free Software Mirror Group as I read the URL I provided – guiverc May 05 '21 at 04:50
  • i did but the same error happended – joe May 05 '21 at 21:11
  • @guiverc i need help with this i tried but the same error happended – joe May 07 '21 at 23:14
  • I don't know the mirror you're using (Research and Education Advanced Network New Zealand is owner doesn't stand out on https://launchpad.net/ubuntu/+archivemirrors but I said it was the FSMG earlier) so as per my last three comments I'd remove the country (nz.) detail & use the main archive instead of whomever you are using. I'd use an editor as I said two comments back, but you can use GUI tools too if using a desktop system. – guiverc May 07 '21 at 23:37
  • i told you thats what i did i removed nz. in sources list – joe May 07 '21 at 23:44
  • I'd suggest adjusting your question then with the newer detail.. as it still shows you using http://nz.archive.ubuntu.com/ (ie. updating it & replacing the old detail with where you are now.. you want help with your current issue) – guiverc May 07 '21 at 23:50

1 Answers1

0

I FIXED IT i was sooo stupid. so i was unable to access the website for reasons then i fixed it and BOOM

I am sooo sorry for the inconvenience

joe
  • 1