ERROR: The package cache file is corrupted (apt_pkg.Error)
The error was: apt_pkg.Error:
E:Problem renaming the file /var/cache/apt/pkgcache.bin.bUUQ0S to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)
W: You may want to run apt-get update to correct these problems
E: The package cache file is corruptedSolución
# Limpiar y actualizar el caché de APT (fix DigitalOcean cache corruption)
- name: Limpiar y actualizar el caché de APT
shell: |
rm -f /var/cache/apt/pkgcache.bin /var/cache/apt/srcpkgcache.bin || true
apt-get clean
apt-get update
become: trueLast updated