improve the message for failed dependencies, fix #1720