Set apt-get to use gzip bz2, gzip or uncompressed file?

6,593

To answer your question, you can try this apt option:

sudo apt-get -o Acquire::CompressionTypes::Order::=bz2 update

See the man page for apt.conf.

But I'm pretty sure that your problem comes from the repository itself.

Share:
6,593

Related videos on Youtube

cnvzmxcvmcx
Author by

cnvzmxcvmcx

Updated on September 18, 2022

Comments

  • cnvzmxcvmcx
    cnvzmxcvmcx almost 2 years

    The ubuntu repositories dists folder contains both Packages, Packages.gz and Packages.bz2 files. Out of these, apt-get uses one of them during an update. Where can I configure apt to choose a particular compression type file instead of others.

    I am in a university using an internal mirror and for some reason one of the files is giving a Hash mismatch error. I think if I use bz2 instead of gzip, perhaps I can get past the erroneous file. My apt-get update always tries to fetch .gz files and fails on one of them.

    • terdon
      terdon about 10 years
      It is very unlikely that this will solve your error. What repository are you using?
    • cnvzmxcvmcx
      cnvzmxcvmcx about 10 years
      I am using internal mirror for trusty packages. Hash mismatch for ubuntu_dists_trusty_main_binary-i386_Packages. Anyways, I am more interested in apt than solving the error, hence the title. Answers to this error is delete the local file and update again. I did that only to repeat the error.