You didn't tell us what distribution of Linux you are using (there are many that use rpm). If it's Fedora Core, for example, then you should rather use
yum install packagename
to install a program (package) called packagename
. That solves dependencies for you, downloads and installs them (given that the asked package is in the Fedora reposities); rpm
itself does calculate dependencies and report you if some are missing, but it doesn't search nor download nor automatically install them for you.
Every modern distribution usually has a package manager (like yum in the above example) that can search for, download and install asked packages and their dependencies with one command. In most cases there exists even a graphical front-end for the package manager, so the user does not necessarily need to use any console commands if s/he doesn't want to. On Fedora the package tool can be found in the menus, I just don't remember it's name (but I assume it's easily found). On Ubuntu, for example, the package manager is apt
is the command to use) and the graphical front-end is called Synaptic
(latter on KDE). I assume Mandriva and others have this kind of tool as well; SuSE probably uses it's YaST to do the job.
So: find out what tool your system uses to manage packages and either use the textual interface (command) or locate a graphical front-end, usually found in the system menu, or if you don't know how to find it (using Google for example: Fedora package manager
), post here which distribution you are using and more precise examples can be given.