There are a few reasons why you encounter these errors:
-
There might be an issue with the existing cache and/or disc space. In order to fix it you need to clear the APT cache by executing:
sudo apt-get clean
andsudo apt-get update
. -
The same goes with existing docker images. Execute:
docker image prune -f
anddocker container prune -f
in order to remove unused data and free disc space. Executingdocker image prune -f
will delete all the unused images. To delete some selective images of large size, rundocker images
and identify the images you want to remove, and then rundocker rmi -f <IMAGE-ID1> <IMAGE-ID2> <IMAGE-ID3>
. -
If you don’t care about the security risks, you can try to run the
apt-get
command with the--allow-unauthenticated
or--allow-insecure-repositories
flag. According to the docs:
Ignore if packages can’t be authenticated and don’t prompt about it.
This can be useful while working with local repositories, but is a
huge security risk if data authenticity isn’t ensured in another way
by the user itself.
Please let me know if that helped.