Updating to itunes plus
When the cable is unplugged/loose, the i Phone looses connection with i Tunes.
After restoring a functional i OS, you can restore the latest backup of your i Phone. Tiny Umbrella) that have the means of getting an i Phone out of the Recovery Mode, if the i OS is otherwise functional.
Apple’s support page lists error 9 as a possible security software issue.
This could be firewall blocking access to specific websites/web resources (like i Tunes trying to download something from Apple’s servers).
Even Apple revealed at WWDC that i OS 9 will only be about 1.3GB in size, it can still be a tough task for many 8/16 GB i Phone or i Pad users to free up that much space, especially if they're not syncing to i Tunes to manage storage manually.
Or you can try again with these methods mentioned in this guide - How to Fix Software Update Failed Error, like, updating with i Tunes, upgrade with IPSW file, etc.
For some whose i Phone 5/5s/55c running with i OS 8 or i OS 7, they need to upgrade to i OS 9 firstly. Plug the i Phone to your computer via the USB cable and make sure that the latest i Tunes is installed. To keep copies of the whole i Phone/i Pad content on computer in a viewable format, you can try an i Tunes alternative like Any Trans to transfer photos, videos, songs, messages, notes, contacts, voice memos, and more to computer.