1

I have a Ubuntu 16.10 64 bit machine.

When I try to do sudo apt-get install cmake, I get the following error:

After this operation, 20.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu yakkety/main amd64 cmake amd64 3.5.2-2ubuntu1 [2,779 kB]
Err:1 http://us.archive.ubuntu.com/ubuntu yakkety/main amd64 cmake amd64 3.5.2-2ubuntu1
  Hash Sum mismatch
  Hashes of expected file:
   - SHA256:28f7a54d94e32027321460169ddf7c66d627e96a275612e371064192b4f1fe75
   - SHA1:be57190df55b20ddfc192570cd225436fa60caf0 [weak]
   - MD5Sum:454e05c9e6ae224d3416b04f2a876699 [weak]
   - Checksum-FileSize:2778872 [weak]
  Hashes of received file:
   - SHA256:d3981d14c6c2d2d0c42cc7dd00b42264e5e94f7bb2d5908ae3bbcc707e8a881b
   - SHA1:9c2716a4ff17005f7a9f4c9b6cf9c370a5a813ef [weak]
   - MD5Sum:9118651936fd4509d1dd98b662678ac6 [weak]
   - Checksum-FileSize:2778872 [weak]
  Last modification reported: Wed, 29 Jun 2016 15:10:18 +0000
Fetched 2,779 kB in 7min 48s (5,926 B/s)                                       
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/c/cmake/cmake_3.5.2-2ubuntu1_amd64.deb  Hash Sum mismatch
   Hashes of expected file:
    - SHA256:28f7a54d94e32027321460169ddf7c66d627e96a275612e371064192b4f1fe75
    - SHA1:be57190df55b20ddfc192570cd225436fa60caf0 [weak]
    - MD5Sum:454e05c9e6ae224d3416b04f2a876699 [weak]
    - Checksum-FileSize:2778872 [weak]
   Hashes of received file:
    - SHA256:d3981d14c6c2d2d0c42cc7dd00b42264e5e94f7bb2d5908ae3bbcc707e8a881b
    - SHA1:9c2716a4ff17005f7a9f4c9b6cf9c370a5a813ef [weak]
    - MD5Sum:9118651936fd4509d1dd98b662678ac6 [weak]
    - Checksum-FileSize:2778872 [weak]
   Last modification reported: Wed, 29 Jun 2016 15:10:18 +0000
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

When I run sudo apt-get update I get the following error.

#lot of lines like the next two lines
Get:30 http://us.archive.ubuntu.com/ubuntu yakkety-updates/multiverse amd64 Packages [4,653 B]
Get:32 http://us.archive.ubuntu.com/ubuntu yakkety-updates/multiverse Translation-en [2,076 B]
Fetched 816 kB in 23min 40s (574 B/s)                                          
Reading package lists... Done
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/yakkety-updates/main/dep11/icons-64x64.tar  Could not open file /var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_yakkety-updates_main_dep11_icons-64x64.tar.gz - open (13: Permission denied) [IP: 91.189.91.26 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/yakkety-updates/universe/dep11/Components-amd64.yml.gz  
E: Some index files failed to download. They have been ignored, or old ones used instead.

Can anyone kindly point me to a solution for this problem? Thanks.

ankit7540
  • 4,195

3 Answers3

1

You can try:

sudo apt-get -o 'Acquire::http::No-Cache=true; Acquire::http::Pipeline-Depth=0;' install NAMEHERE

apt bug explained here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810796

Andrei
  • 23
1

From system settings select software & updates. It will take some time for update your OS from server for India, after system update done try to install software what you want.

Zanna
  • 72,312
1

Remove the repository entry causing the problem.

The problems you are having is a result of installing a repository ahead of your Ubuntu version. This causing the unmet dependencies breackage you are seeing.

The resolution is to remove the offending repository entry. You can identify this by the yakkety reference in your error message:

Err:1 http://us.archive.ubuntu.com/ubuntu yakkety/main amd64 cmake amd64 3.5.2-2ubuntu1

Remove that entry, then update your repository cache with:

$ sudo apt update
$ sudo apt upgrade

If you need to install something that is made for a newer OS release, you will have to manually compile it and it's neccesary dependencies.

Alternatively you can look for a PPA that is made for your Ubuntu installion, which you have indicated as Ubuntu 16.04.

L. D. James
  • 25,444