There are multiple known causes for this error:
- You attempted to set a route specific to an interface which was not up at the time you ran the command.
- You attempted to set a route for a network before setting a host route for the gateway which handles traffic for that network.