Please help me to install packages. When I install the options for random repository package is not shown.
marked as duplicate by Werner, cmhughes, Alan Munn, lockstep, Martin Scharrer♦ May 21 '12 at 16:34
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
I gather you use MiKTeX 2.8. (Aside: you should really consider updating your MiKTeX distribution to version 2.9!) To manually install packages -- rather than rely on MikTeX's built-in autoloader process -- bring up the "MikTeX Package Manager" program (under "All Programs -> MikTeX -> Maintenance"), search for and highlight (by clicking on) the lines that say "sectsty" and "titlesec", respectively, and click on the "+" (Plus) button. After a few minutes, the packages should be ready for you to work with.
Of course, this method requires you to have a connection to the Internet where your computer is not located behind some firewall. If you are behind some firewall, though, you may be out of luck until and unless you can get connected to the Internet differently.