Generally if odin is failing to flash the rom it is the wrong firmware you're trying to flash.
If you were running 8 and try installing 7 it will fail due to the bootloader being updated and it's impossible to downgrade after that.
Another reason is incorrect firmware for you phone.