the repository does not have a release file eoan

C++
apt-get update --allow-insecure-repositoriessudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

Source

Also in C++: