So I did but apparently Apple is not letting complete the installation because it is a unknown program.
That sounds like you have a much newer iMac than the pre-2006 models this forum covers. Thise models don;t support OS version taht do the security checks.
I think you will get better help with your installation issues and how to work with Apple's security checks by posting in the forum for your verison o the Mac OS. Choose your OS version (do "About this Mac" to see what version you have) from this list of forums: