ROS Installation error: Hash Mismatch errors

I was trying to install ROS on my laptop, but even after numerous tries, i keep getting Hash mismatch errors. I would really appreciate any help.

I have gone thorough the ros forums and StackOverflow and they all suggest the following solution, which did not solve the issue.
Suggested solutions:

sudo rm -rfv /var/lib/apt/lists/*
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade

The errors are as follows:

E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-8/libgcc-8-dev_8.4.0-3ubuntu2_amd64.deb  Hash Sum mismatch
   Hashes of expected file:
    - SHA256:8733725ae1d9d320f83253111eb116789dde67f83384fde7940287c3c147de6b
    - SHA1:5fd8c960cd9cfca4652a15c6f4fbc4110d9bc944 [weak]
    - MD5Sum:c655d5ed6110973d5fe8bce98d041528 [weak]
    - Filesize:2313236 [weak]
   Hashes of received file:
    - SHA256:af45ae7bc0efe222936788a6ac49058ae21e820fdb86f796bea4d15594b4ea1a
    - SHA1:acec59a4b38107e0c5941b1b768cadcc695722cb [weak]
    - MD5Sum:4c0cbc6c45c668f80451fc983caa623b [weak]
    - Filesize:2313236 [weak]
   Last modification reported: Fri, 03 Apr 2020 18:28:43 +0000
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libz/libzstd/libzstd-dev_1.4.4+dfsg-3ubuntu0.1_amd64.deb  Hash Sum mismatch
   Hashes of expected file:
    - SHA512:9ae2d0ea3962f76e79743dfb41a22c17a8ba6acc9b3de2e0aafd8d0fd8363ca93d2510a3913d30ff1dd53c11e9b411e5f63bb38710c37c7cf2d44b09857d0798
    - SHA256:c731b4b31a526825105b5b120837cf0b49576a01836cb12083db9fa948e2688c
    - SHA1:d9f97b3522635e0b44b199ae05a92d17b6e29ceb [weak]
    - MD5Sum:532ee38ed94212d61867b6f341191c5d [weak]
    - Filesize:286408 [weak]
   Hashes of received file:
    - SHA512:11c8c8e44bbf475d21d235131eac63a63554d845d5c6a7a979c63fc9059806a1cb2dd4c96be97e17b557d9319409f7a231679bc4086ca4e051d4bdec105a8598
    - SHA256:d9f250b36f94b5881640fb9756acf8ab3536b5a65e2ce6dad6d959a173767908
    - SHA1:0ace765f500348cbf361be9d9c11b5ad8c435fe4 [weak]
    - MD5Sum:999477cd9e62e87c25e9cbde14de828b [weak]
    - Filesize:286408 [weak]
   Last modification reported: Mon, 08 Mar 2021 18:23:56 +0000
E: Failed to fetch http://packages.ros.org/ros/ubuntu/pool/main/r/ros-noetic-urdf-tutorial/ros-noetic-urdf-tutorial_0.5.0-1focal.20220218.094057_amd64.deb  Hash Sum mismatch
   Hashes of expected file:
    - SHA256:def0930aa211f66376f7abe701cf5b161a1e23ee85b562e3110f667b5c807422
    - SHA1:dbc74991fee2b80621ec066ab2788816166f3b52 [weak]
    - MD5Sum:8233bcb7a4c869e13c871b7c37f940e5 [weak]
    - Filesize:749032 [weak]
   Hashes of received file:
    - SHA256:e533e92dbbc666a5fc21df034c43ca04e62170fdd0a02ce193e0f5a908ec8685
    - SHA1:d6fb450b1df895062911aea59ff33a87bc991467 [weak]
    - MD5Sum:e4e3fa28782022cfd7a8bf565cb0010f [weak]
    - Filesize:749032 [weak]
   Last modification reported: Fri, 18 Feb 2022 09:44:09 +0000
E: Failed to fetch http://packages.ros.org/ros/ubuntu/pool/main/g/gazebo11/libgazebo11-dev_11.9.0-1~focal_amd64.deb  Hash Sum mismatch
   Hashes of expected file:
    - SHA512:fdda9f687a9331f1914791bbb590a87e31fe366566400f15e1fd83198eb29e6f1c1a2e03e0fc62e2cddf5a0970242b41bf23d04fe91e86e7a56cc6aca7bf487d
    - SHA256:f2ea1f80f8bdc6f50f3feacd68a0ce4f3baa84fe55d791d0b8d2e932965ef667
    - SHA1:51366071255c2bd2a76580061624174d5542710e [weak]
    - MD5Sum:be00848b408c9a528662d5a424c20ef1 [weak]
    - Filesize:704680 [weak]
   Hashes of received file:
    - SHA512:af6792c14d0dc3bfc3f5e3b1ad734cdd4a2f1e64f4e4c9a6ed1fff5c2e9e8e86452debcc88f3cea0f4f81772ffec872ee56a1468073ad1ccf2ae0c744ccd6450
    - SHA256:b25ecfadbdae6405dd92dfc038429509ac8d3f703fefc7875b2726f7da183271
    - SHA1:03233d43d5361d12e258cdbc24be24d27e66eb41 [weak]
    - MD5Sum:12ef9cfe35b0bbc14cb45d298962a66b [weak]
    - Filesize:704680 [weak]
   Last modification reported: Sat, 13 Nov 2021 01:08:25 +0000
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


When i tried the following:

sudo apt install ros-noetic-desktop-full --fix-missing

The installation began but resulted in an error as follows:

Setting up ros-noetic-rqt-common-plugins (0.4.9-1focal.20220328.225840) ...
Setting up ros-noetic-perception (1.5.0-1focal.20220221.112208) ...
Setting up ros-noetic-viz (1.5.0-1focal.20220328.230559) ...
Setting up ros-noetic-desktop (1.5.0-1focal.20220328.230732) ...
Setting up ros-noetic-simulators (1.5.0-1focal.20220328.230548) ...
Setting up ros-noetic-desktop-full (1.5.0-1focal.20220328.230759) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-8/libgcc-8-dev_8.4.0-3ubuntu2_amd64.deb  Hash Sum mismatch
   Hashes of expected file:
    - SHA256:8733725ae1d9d320f83253111eb116789dde67f83384fde7940287c3c147de6b
    - SHA1:5fd8c960cd9cfca4652a15c6f4fbc4110d9bc944 [weak]
    - MD5Sum:c655d5ed6110973d5fe8bce98d041528 [weak]
    - Filesize:2313236 [weak]
   Hashes of received file:
    - SHA256:af45ae7bc0efe222936788a6ac49058ae21e820fdb86f796bea4d15594b4ea1a
    - SHA1:acec59a4b38107e0c5941b1b768cadcc695722cb [weak]
    - MD5Sum:4c0cbc6c45c668f80451fc983caa623b [weak]
    - Filesize:2313236 [weak]

Hi Joseph1001,

Maybe the next link will help you:

Is a common repository error.

Best regards,

Seba.

Maybe you can use apt instead apt-get or change the repository that are you using.

@asrc , Thank you for sharing the link. i tried the method mentioned in the link, but the last error keeps appearing.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.