Adobe no longer sells CS5 licenses. To upgrade legitimately:
If you have the installation discs or a downloaded installer: upgrade to cs5 extended
Because CS5 is older software, you will likely run into issues on newer operating systems: Adobe no longer sells CS5 licenses
If you own a valid CS5 serial key and the installer fails, your best option is to check if Adobe is still offering a (they did this for CS3/CS4 users for a while), or consider moving to the Adobe Photography Plan (Creative Cloud) , which is the only officially supported method for modern hardware. upgrade to cs5 extended