Upgrade ubuntu 18 to 20, apt error stops upgrade

During the upgrade from ubuntu 18 to 20, upon obtaining all the available packages from ubuntu’s repo this package is not found. Then the whole upgrade stops.

“apt: error while loading shared libraries: libapt-pkg.so.5.0: cannot open shared object file: No such file or directory”

error apt

I’ll refer you to the Support and Help section guide where you’ll note

The oldest release of Ubuntu in standard support currently is Ubuntu 22.04 LTS from 2022-April, which is still in it’s 5 years of standard support.

Ubuntu Core 18 & Ubuntu Core 20 are supported now only by Canonical; the five years of standard support having completed (Canonical support it for a total of 10 years).

If you meant Ubuntu 20.04 LTS; it’s EOSS too with ESM starting on 29 May 2025…