You need to use the acs-admin installer and upgrade from the filesystem.
https://openacs.org/doc/openacs-5-2/upgrade-5-0-dot.html