In some case it helped to set the date of the Mac back to the date of the installer to avoid issues with expired certificates. But even if you manage to install Aperture 2 it will be a pain to use because so many features are broken on Mavericks.
Unfortunately it is no longer possible to upgrade Aperture 3 because Apple stopped the development of Aperture and is no longer selling it. Aperture 3.5.1 is not available outside the AppStore.
If you upgrade to el Capitan, you can open your Aperture 2 libraries in Photos for Mac.
See: How Photos handles content and metadata from iPhoto and Aperture - Apple Support
This will allow you to browse and edit them, and to export them to migrate the library to other professional applications, like Capture One or Lightroom.