“Hash sum mismatch” error when doing apt-get update











up vote
0
down vote

favorite












Specific files are causing this error, like



Err:7 http://in.archive.ubuntu.com/ubuntu bionic/main i386 Packages 


Err:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages



I have tried all the solutions posted in similar questions, but it still seems to happen.



I've tried fixes from the following questions but still no luck:
sudo apt-get update failes due to Hash Sum mismatch



"hash sum mismatch" error when doing update



"apt-get update" always failed to fetch



Also I am behind a proxy, so I have added these lines to etc/apt/apt.conf



Acquire::http::proxy "http://<proxy>:<port>/";
Acquire::ftp::proxy "ftp://<proxy>:<port>/";
Acquire::https::proxy "https://<proxy>:<port>/";`









share|improve this question
























  • Strangely, the update happens when I run sudo apt-get update for the second time.
    – Harish
    Oct 15 at 6:45










  • Ah, I just replied to your other post where you had the same issue but switching from apt to apt-get did fix the problem. Did you find any solution?
    – Trey
    Nov 30 at 22:22










  • and I found a possible solution; added below.
    – Trey
    Nov 30 at 22:44















up vote
0
down vote

favorite












Specific files are causing this error, like



Err:7 http://in.archive.ubuntu.com/ubuntu bionic/main i386 Packages 


Err:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages



I have tried all the solutions posted in similar questions, but it still seems to happen.



I've tried fixes from the following questions but still no luck:
sudo apt-get update failes due to Hash Sum mismatch



"hash sum mismatch" error when doing update



"apt-get update" always failed to fetch



Also I am behind a proxy, so I have added these lines to etc/apt/apt.conf



Acquire::http::proxy "http://<proxy>:<port>/";
Acquire::ftp::proxy "ftp://<proxy>:<port>/";
Acquire::https::proxy "https://<proxy>:<port>/";`









share|improve this question
























  • Strangely, the update happens when I run sudo apt-get update for the second time.
    – Harish
    Oct 15 at 6:45










  • Ah, I just replied to your other post where you had the same issue but switching from apt to apt-get did fix the problem. Did you find any solution?
    – Trey
    Nov 30 at 22:22










  • and I found a possible solution; added below.
    – Trey
    Nov 30 at 22:44













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Specific files are causing this error, like



Err:7 http://in.archive.ubuntu.com/ubuntu bionic/main i386 Packages 


Err:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages



I have tried all the solutions posted in similar questions, but it still seems to happen.



I've tried fixes from the following questions but still no luck:
sudo apt-get update failes due to Hash Sum mismatch



"hash sum mismatch" error when doing update



"apt-get update" always failed to fetch



Also I am behind a proxy, so I have added these lines to etc/apt/apt.conf



Acquire::http::proxy "http://<proxy>:<port>/";
Acquire::ftp::proxy "ftp://<proxy>:<port>/";
Acquire::https::proxy "https://<proxy>:<port>/";`









share|improve this question















Specific files are causing this error, like



Err:7 http://in.archive.ubuntu.com/ubuntu bionic/main i386 Packages 


Err:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages



I have tried all the solutions posted in similar questions, but it still seems to happen.



I've tried fixes from the following questions but still no luck:
sudo apt-get update failes due to Hash Sum mismatch



"hash sum mismatch" error when doing update



"apt-get update" always failed to fetch



Also I am behind a proxy, so I have added these lines to etc/apt/apt.conf



Acquire::http::proxy "http://<proxy>:<port>/";
Acquire::ftp::proxy "ftp://<proxy>:<port>/";
Acquire::https::proxy "https://<proxy>:<port>/";`






apt update-manager






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 15 at 6:26

























asked Oct 15 at 6:16









Harish

12




12












  • Strangely, the update happens when I run sudo apt-get update for the second time.
    – Harish
    Oct 15 at 6:45










  • Ah, I just replied to your other post where you had the same issue but switching from apt to apt-get did fix the problem. Did you find any solution?
    – Trey
    Nov 30 at 22:22










  • and I found a possible solution; added below.
    – Trey
    Nov 30 at 22:44


















  • Strangely, the update happens when I run sudo apt-get update for the second time.
    – Harish
    Oct 15 at 6:45










  • Ah, I just replied to your other post where you had the same issue but switching from apt to apt-get did fix the problem. Did you find any solution?
    – Trey
    Nov 30 at 22:22










  • and I found a possible solution; added below.
    – Trey
    Nov 30 at 22:44
















Strangely, the update happens when I run sudo apt-get update for the second time.
– Harish
Oct 15 at 6:45




Strangely, the update happens when I run sudo apt-get update for the second time.
– Harish
Oct 15 at 6:45












Ah, I just replied to your other post where you had the same issue but switching from apt to apt-get did fix the problem. Did you find any solution?
– Trey
Nov 30 at 22:22




Ah, I just replied to your other post where you had the same issue but switching from apt to apt-get did fix the problem. Did you find any solution?
– Trey
Nov 30 at 22:22












and I found a possible solution; added below.
– Trey
Nov 30 at 22:44




and I found a possible solution; added below.
– Trey
Nov 30 at 22:44










1 Answer
1






active

oldest

votes

















up vote
0
down vote













I have no good explanation for why this might work, but it just did for me, when I got these errors trying to do sudo apt install emacs25 or sudo apt-get install emacs25. So in case it works for others:



This install of emacs25/bionic,now 25.2+1-6 amd64 required several dependent packages, namely:




  1. emacs25-bin-common/bionic,now 25.2+1-6 amd64

  2. emacs25-common/bionic,bionic,now 25.2+1-6 all

  3. emacs25-el/bionic,bionic,now 25.2+1-6 all

  4. emacsen-common/bionic,bionic,now 2.0.8 all


I wanted to see if I could narrow down what the particular problem file was, since they were all throwing hash sum errors, so I tried to install emacs25-common. Same issue (though it had dependencies on all the other three numbered above).



Then I tried sudo apt install emacs25-el. This worked, and curiously, the first dependency it installed was emacs25-common — the one I'd just tried to install unsuccessfully. It installed emacs25-common and the other three packages (all except for emacs25 itself) successfully.



Then I did sudo apt install emacs25. This, too, worked.



So this is voodoo, but I would suggest trying to install the dependencies separately first, trying different dependencies, until one does install, and then trying again.



My guess would be that something server-side was being cached, and breaking the normal order of requests resulted in a cache miss allowing the original file to be re-checksummed, but that's a total stab in the dark.



(After the above was done I was able to install the suggested package using sudo apt install emacs25-common-non-dfsg without issues.)






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1083837%2fhash-sum-mismatch-error-when-doing-apt-get-update%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    I have no good explanation for why this might work, but it just did for me, when I got these errors trying to do sudo apt install emacs25 or sudo apt-get install emacs25. So in case it works for others:



    This install of emacs25/bionic,now 25.2+1-6 amd64 required several dependent packages, namely:




    1. emacs25-bin-common/bionic,now 25.2+1-6 amd64

    2. emacs25-common/bionic,bionic,now 25.2+1-6 all

    3. emacs25-el/bionic,bionic,now 25.2+1-6 all

    4. emacsen-common/bionic,bionic,now 2.0.8 all


    I wanted to see if I could narrow down what the particular problem file was, since they were all throwing hash sum errors, so I tried to install emacs25-common. Same issue (though it had dependencies on all the other three numbered above).



    Then I tried sudo apt install emacs25-el. This worked, and curiously, the first dependency it installed was emacs25-common — the one I'd just tried to install unsuccessfully. It installed emacs25-common and the other three packages (all except for emacs25 itself) successfully.



    Then I did sudo apt install emacs25. This, too, worked.



    So this is voodoo, but I would suggest trying to install the dependencies separately first, trying different dependencies, until one does install, and then trying again.



    My guess would be that something server-side was being cached, and breaking the normal order of requests resulted in a cache miss allowing the original file to be re-checksummed, but that's a total stab in the dark.



    (After the above was done I was able to install the suggested package using sudo apt install emacs25-common-non-dfsg without issues.)






    share|improve this answer

























      up vote
      0
      down vote













      I have no good explanation for why this might work, but it just did for me, when I got these errors trying to do sudo apt install emacs25 or sudo apt-get install emacs25. So in case it works for others:



      This install of emacs25/bionic,now 25.2+1-6 amd64 required several dependent packages, namely:




      1. emacs25-bin-common/bionic,now 25.2+1-6 amd64

      2. emacs25-common/bionic,bionic,now 25.2+1-6 all

      3. emacs25-el/bionic,bionic,now 25.2+1-6 all

      4. emacsen-common/bionic,bionic,now 2.0.8 all


      I wanted to see if I could narrow down what the particular problem file was, since they were all throwing hash sum errors, so I tried to install emacs25-common. Same issue (though it had dependencies on all the other three numbered above).



      Then I tried sudo apt install emacs25-el. This worked, and curiously, the first dependency it installed was emacs25-common — the one I'd just tried to install unsuccessfully. It installed emacs25-common and the other three packages (all except for emacs25 itself) successfully.



      Then I did sudo apt install emacs25. This, too, worked.



      So this is voodoo, but I would suggest trying to install the dependencies separately first, trying different dependencies, until one does install, and then trying again.



      My guess would be that something server-side was being cached, and breaking the normal order of requests resulted in a cache miss allowing the original file to be re-checksummed, but that's a total stab in the dark.



      (After the above was done I was able to install the suggested package using sudo apt install emacs25-common-non-dfsg without issues.)






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        I have no good explanation for why this might work, but it just did for me, when I got these errors trying to do sudo apt install emacs25 or sudo apt-get install emacs25. So in case it works for others:



        This install of emacs25/bionic,now 25.2+1-6 amd64 required several dependent packages, namely:




        1. emacs25-bin-common/bionic,now 25.2+1-6 amd64

        2. emacs25-common/bionic,bionic,now 25.2+1-6 all

        3. emacs25-el/bionic,bionic,now 25.2+1-6 all

        4. emacsen-common/bionic,bionic,now 2.0.8 all


        I wanted to see if I could narrow down what the particular problem file was, since they were all throwing hash sum errors, so I tried to install emacs25-common. Same issue (though it had dependencies on all the other three numbered above).



        Then I tried sudo apt install emacs25-el. This worked, and curiously, the first dependency it installed was emacs25-common — the one I'd just tried to install unsuccessfully. It installed emacs25-common and the other three packages (all except for emacs25 itself) successfully.



        Then I did sudo apt install emacs25. This, too, worked.



        So this is voodoo, but I would suggest trying to install the dependencies separately first, trying different dependencies, until one does install, and then trying again.



        My guess would be that something server-side was being cached, and breaking the normal order of requests resulted in a cache miss allowing the original file to be re-checksummed, but that's a total stab in the dark.



        (After the above was done I was able to install the suggested package using sudo apt install emacs25-common-non-dfsg without issues.)






        share|improve this answer












        I have no good explanation for why this might work, but it just did for me, when I got these errors trying to do sudo apt install emacs25 or sudo apt-get install emacs25. So in case it works for others:



        This install of emacs25/bionic,now 25.2+1-6 amd64 required several dependent packages, namely:




        1. emacs25-bin-common/bionic,now 25.2+1-6 amd64

        2. emacs25-common/bionic,bionic,now 25.2+1-6 all

        3. emacs25-el/bionic,bionic,now 25.2+1-6 all

        4. emacsen-common/bionic,bionic,now 2.0.8 all


        I wanted to see if I could narrow down what the particular problem file was, since they were all throwing hash sum errors, so I tried to install emacs25-common. Same issue (though it had dependencies on all the other three numbered above).



        Then I tried sudo apt install emacs25-el. This worked, and curiously, the first dependency it installed was emacs25-common — the one I'd just tried to install unsuccessfully. It installed emacs25-common and the other three packages (all except for emacs25 itself) successfully.



        Then I did sudo apt install emacs25. This, too, worked.



        So this is voodoo, but I would suggest trying to install the dependencies separately first, trying different dependencies, until one does install, and then trying again.



        My guess would be that something server-side was being cached, and breaking the normal order of requests resulted in a cache miss allowing the original file to be re-checksummed, but that's a total stab in the dark.



        (After the above was done I was able to install the suggested package using sudo apt install emacs25-common-non-dfsg without issues.)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 30 at 22:44









        Trey

        1033




        1033






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1083837%2fhash-sum-mismatch-error-when-doing-apt-get-update%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Ellipse (mathématiques)

            Quarter-circle Tiles

            Mont Emei