Cause: The VMs are pointing to the cached old mirror which is not up-to-date. Hence there is a problem with downloading the package and it's failing.
Workaround: Use the below init script to install the package "ffmpeg". To revert to the original list, just overwrite the .bak file.
This init script works for all possible library installation failures that are caused by the mirror sync issues.
dbutils.fs.put("/databricks/ffmpeg_install.sh", """
#! /bin/bash
# do a backup of the source
cp /etc/apt/sources.list{,.bak}
# remove the cached mirrors
r="deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted"
add-apt-repository --remove "${r}"
r="deb http://archive.ubuntu.com/ubuntu/ focal-updates universe"
add-apt-repository --remove "${r}"
r="deb http://security.ubuntu.com/ubuntu/ focal-security main restricted"
add-apt-repository --remove "${r}"
# update apt & install the package
apt-get update
apt-get install -y ffmpeg
""", True)
Or a simple cleaner method to do this.
rm -f /var/cache/apt /var/lib/apt/lists
apt-get update
apt-get install -y ffmpeg