Obviously there is a mismatch in the application version. If you are trying to replicate live environment, then you should investigate the mismatch and update the new environment accordingly.
Also you should export the configuration from Live environment and import into the new environment.
In my experience I find the service packs / hot fixes etc are cumulative. Therefore in this instance, user should be able to install AX 4.0 and then AX 4.0 SP2.