First of all, before attempting an upgrade, you should back up your important files. Upgrading doesn't always go smoothly.
Secondly, the instructions you tried to follow are out-of-date. Those instructions would have worked prior to April 2013, when support for 10.04 ended. At that point, the repositories were moved. (That's also the reason you received the "Sharing installation service failed" message.)
You need to redirect your sources file to the new location. Open the file using a text editor. (I recommend gedit rather than vi, because for the average user, it's easier.)
The source lines you need to edit will look like this:
sudo gedit /etc/apt/sources.list
Replace the address so that it looks like this
deb http://address-of-mirror/archivename/ lucid repository-name
(I italicized what you should change for clarity. Don't attempt to italicize them in the file.)
deb http://old-releases.ubuntu.com/ubuntu lucid repository-name
Then save and close the file.
You can then proceed with
and then move on with the upgrade process.
sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoremove