You forgot to mention your router and that affects the correct answer...
But based on your error message I guess that your have one of the wrt1900/1200/3200ac routers and the question is discussed in e.g. these threads:
In nutshell, you need to flash with manual sysupgrade from console using the force option -F, so download/copy the correct Linksys firmware to /tmp, ssh into the router, cd to /tmp and run sysupgrade -n -F linksysfirmware.img
console just means the normal ssh connection to the terminal, so that you can issue commands from command-line with keyboard. The traditional command-line-interface
You need to use ssh, putty or whatever tool is suitable for your PC.
There is also an entry in the OpenWRT-Wiki how to go back to stock firmware.
If you are getting an error message while trying this, please post the excat command you are using and the exact error message. Else nobody will be able to help you.
There is an easier way: you can try to boot from the "backup" partition in the router (I've done that many times with my e4200v2, it seems that WRT AC series have them too) that involves only playing with the power.