-
-
Save trastle/5722089 to your computer and use it in GitHub Desktop.
Acquire::http::Pipeline-Depth "0"; | |
Acquire::http::No-Cache=True; | |
Acquire::BrokenProxy=true; |
#!/bin/bash | |
sudo rm /var/lib/apt/lists/* | |
sudo rm /var/lib/apt/lists/partial/* | |
sudo apt-get update |
(Not an answer to the question above, just a backlink)
Relates SO question: https://askubuntu.com/questions/679233/failed-to-fetch-hash-sum-mismatch-tried-rm-apt-list-but-didnt-work
this helped me to work around a apt-get install issue about error "Hash Sum MIsmatch" in docker.
Also can set options at runtime:
apt-get -o Acquire::BrokenProxy="true" -o Acquire::http::No-Cache="true" -o Acquire::http::Pipeline-Depth="0"
Fucking life saver!! Tks a lot @trastle !!
@so-jelly THANKS!!! that helped
Thanks @trastle and @so-jelly I'm also behind some company proxy and this workaround was helpful for me ("Hash sum mismatch")
In case any need it to formatted for dockerfile too:
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
-o Acquire::http::No-Cache=true \
-o Acquire::http::Pipeline-Depth=0 \
-o Acquire::BrokenProxy=true \
&& apt-get install -y --no-install-recommends \
package1 \
package2 \
package3 \
&& rm -rf /var/lib/apt/lists/*
Thanks @trastle and @so-jelly I'm also behind some company proxy and this workaround was helpful for me ("Hash sum mismatch")
In case any need it to formatted for dockerfile too:ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update \ -o Acquire::http::No-Cache=true \ -o Acquire::http::Pipeline-Depth=0 \ -o Acquire::BrokenProxy=true \ && apt-get install -y --no-install-recommends \ package1 \ package2 \ package3 \ && rm -rf /var/lib/apt/lists/*
Now also failures with fetching packages
E: Failed to fetch http://******/main/f/fonts-dejavu/fonts-dejavu-core_2.35-1_all.deb Hash Sum mismatch
E: Failed to fetch http://******main/u/ucf/ucf_3.0036_all.deb Hash Sum mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I'll try again with the same options for install
EDIT: it solved the issue
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
-o Acquire::http::No-Cache=true \
-o Acquire::http::Pipeline-Depth=0 \
-o Acquire::BrokenProxy=true \
&& apt-get install -y --no-install-recommends \
-o Acquire::http::No-Cache=true \
-o Acquire::http::Pipeline-Depth=0 \
-o Acquire::BrokenProxy=true \
package1 \
package2 \
package3 \
&& rm -rf /var/lib/apt/lists/*
another backlink:
https://askubuntu.com/a/809808
Can you explain the use and the terms in 99fixbadproxy
Inside Dockerfile add this
RUN touch /etc/apt/apt.conf.d/99fixbadproxy
RUN echo "Acquire::http::Pipeline-Depth 0;Acquire::http::No-Cache true;Acquire::BrokenProxy true;" >> /etc/apt/apt.conf.d/99fixbadproxy
Can you explain the use and the terms in 99fixbadproxy