Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
09-21-2005, 07:10 AM
|
#1
|
LQ Newbie
Registered: Sep 2005
Location: Athens, Greece
Distribution: RedHat 9
Posts: 24
Rep:
|
How to find an installed .rpm file
Hello to all. I downloaded from windows a getting started rpm file of RedHat 9. I wrote it in a cd under a folder which i named RH 9. Then I logged on the Linux system in order to install the getting started rpm file from the cd. I opened the cdrom, doudle clicked on the file but after giving the password for the root the system said I dont have the permissions and it cant't be opened. I thought it was better idea to copy it from the cd in my home folder and execute it from there. So I did and an icon appeared for 2 seconds that was installing the rpm file. Before the blue bar reaches the end, the icon dissapeared (within 2 seconds all these). So I dont know if finally this .rpm file (the getting started) was installed or not and where to find it in order to execute it. any ideas? Thank you in advance.
|
|
|
09-21-2005, 07:27 AM
|
#2
|
Member
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441
Rep:
|
Search installed packages
Code:
rpm -qa part_of_the_name*
Replase "part_of_the_name" with a part of the name of the package you want to search.
If you find it is installed
Code:
rpm -q pakage_name -i
will provide you with information about the package.
To install a .rpm in command-line use
Code:
rpm -ivh package_name.rpm
Replace "i" with "U"(not u) to upgrade.
EDIT:See following Megaman X's post, too. It's better than mine.
Last edited by SkyEye; 09-21-2005 at 07:39 AM.
|
|
|
09-21-2005, 07:27 AM
|
#3
|
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337
Rep:
|
Hi!
Try learning Linux command-line, especially when installing/removing applications, because that will give you a much better idea of what is happening on the background that the gui hides from you...
To find out if an .rpm file is installed, there's a command to check for that:
rpm -qa | grep <name>
where q is short for "query" and a is short for "all". The pipe (|) will grab the output of rpm -qa and use as input for the next command, in this case, grep. grep then searches for the name of the package, instead of listing all installed packages, which could be a very long list.
If nothing returns, most likely the package was not installed correctly. This link teaches how to install .rpms and source files from the command line:
http://www.linuxquestions.org/questi...threadid=45094
Good luck!
EDIT: Oops, SkyEye was faster posting :-)
Last edited by Mega Man X; 09-21-2005 at 07:29 AM.
|
|
|
09-21-2005, 07:30 AM
|
#4
|
Member
Registered: Apr 2004
Location: UK
Distribution: Fedora Core (all), Knoppix, RHEL, Centos, Debian
Posts: 100
Rep:
|
Ok, First thing I would do is copy the file to your home and then open a terminal and su to root. Then I would recommend querying if the rpm is installed #rpm -q |grep filename (not 100% sure on this, check man rpm for more details and instructions) finally if it isn't yet installed - as root #rpm -i filename <return> this should install the app.
hope this helps
|
|
|
09-21-2005, 07:31 AM
|
#5
|
LQ Newbie
Registered: Sep 2005
Location: Athens, Greece
Distribution: RedHat 9
Posts: 24
Original Poster
Rep:
|
Hmmmm... I see. And How do I execute it once I find it?
|
|
|
09-21-2005, 07:46 AM
|
#6
|
Member
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661
Rep:
|
when you install a rpm youre installing something in your system, this means that you re puting files in many place... so there arent a magic formula, what you may do is now how the exec of the app you just installed are called.... eg: if I install kopete*.rpm I run it just typing kopete.
try giving part of the program name and pressing TAB to see if it auto-complete...
|
|
|
09-21-2005, 07:51 AM
|
#7
|
Member
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441
Rep:
|
You can see a list of installed files and where they are by this
Code:
rpm -q pakage_name --filesbypkg
|
|
|
09-21-2005, 08:28 AM
|
#8
|
LQ Newbie
Registered: Sep 2005
Location: Athens, Greece
Distribution: RedHat 9
Posts: 24
Original Poster
Rep:
|
Ok, I installed it (probably again) via terminal window as root. However I type it's name and it doesn't run. In fact, I get an error mesage. I still cannot understand how it is supposed to be executed if i don't know where it is in order to run it from there. Maginotjr said that once I install it many files are placed in many places. Since I am a windows user many years I can't understand the meaning of this. Please help me execute it. I am sure now that it is installed 
|
|
|
09-21-2005, 11:22 AM
|
#9
|
LQ Newbie
Registered: Sep 2005
Posts: 4
Rep:
|
Hi,
I have nearly the same issue. I have installed Fedora Core 4. I am told it is very similar to RH Enterprise Linux 4, so I thought I'd use the help resources for this.
I found a RPM package here: http://www.redhat.com/docs/manuals/enterprise/
The saved file is called 'rhel-ig-x8664-multi-en-4-3.noarch.rpm'.
I installed it by double clicking on it.
Using SkyEye's suggestion of 'rpm -q pakage_name --filesbypkg', I was able to find out where all associated files had been installed.
I noticed that one of the files was:
/usr/share/doc/rhel-ig-x8664-multi-en-4/index.html
I opened this in a browser and, sure enough, there is the help file.
I learnt three things from this:
- The help files install as a set of browsable HTML files. There was no mention of this on the RH site so I guess it is just another one of things that is obvious to a seasoned Linux user but not to a newbie such as myself. I assume other, similar help files will install in the same way and all you need to view them is a browser. Gald3r, hopefully this is the same for you too.
- Documentation is stored in /usr/share/doc. Seems sensible enough!
- The RPM command line tool seems much more useful than any GUI equivalent I can find.
Megaman X - it is certainly my intention to learn Command Line ASAP. But people such as Gald3r and myself need to start somewhere. Once we have got over the hurdle of getting access to some help docs, we should be well on our way. I'm grateful there are sites like LinuxQuestions.org and people like you on it 
This was just the first stumbling block (although I still can't get my mouse to work properly with a KVM unless I manually pass 'psmouse.proto=bare' to the Kernel everytime I boot, I still can't change my Hostname without GNOME complaining, I still don't know how to access all the older utilities which my out-of-date RH6 training books mention etc... etc...).
It's going to be a struggle initially, but I'm not giving up.
Thanks to you all for your help. People like you will make the journey so much easier for me...
Holf
|
|
|
09-21-2005, 02:20 PM
|
#10
|
LQ Newbie
Registered: Sep 2005
Location: Athens, Greece
Distribution: RedHat 9
Posts: 24
Original Poster
Rep:
|
I second Holf's thoughts. You were all very helpful. Thank you again.
|
|
|
09-21-2005, 02:53 PM
|
#11
|
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337
Rep:
|
@Holf
Welcome aboard mate. Thanks for your kind words. I totally understand how scary Linux can be at first. If it makes you feel any better, the first time I have actually succeeded installing Linux (mandrake), nothing worked. I then downloaded (after hours trying to find the browser) Winamp, in the hopes to listen to my mp3's, double-clicked on the .exe and nothing happened.... "What stupid OS linux is", I thought... gheheh.
Well, this is your first post here and you made quite a very helpful post and showed a very positive spirit toward Linux. It has been a while since I saw somebody new not actually flaming Linux  .
Once again, welcome. I hope you enjoy it here as much as we do
Regards!
|
|
|
09-21-2005, 04:19 PM
|
#12
|
Member
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661
Rep:
|
when I told that it installs files in many places I mean that it will install lib files, help files (like this HTML files you saw), text files, links, binary, script and so on ...
but this isnt realy importante right now.
You may try going to the website of the package you installed and guess how the binary is called and try to run it on the console... or i will give you a command that you can use to take you out of the bottom right now and find what command to run:
Code:
$ls /usr/bin /bin /sbin /usr/sbin | grep -i "<part of the name of the app>"
eg:
$ls /usr/bin /bin /sbin /usr/sbin | grep -i --color "firef"
mozilla-firefox
firefox-bin
firefox
firefox-profile
So you just need to try one... 
And if you want to realy know where the binary you find is, type:
Code:
eg:
$whereis firefox-bin
firefox-bin: /usr/bin/firefox-bin
Last edited by maginotjr; 09-21-2005 at 04:22 PM.
|
|
|
09-21-2005, 04:24 PM
|
#13
|
Member
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661
Rep:
|
just forgot, if you are newbie you may be confused when you see the exemples with the $ or # ... $ is the simbol of your prompt when youīre running as a normal user and # is when youīre using it as root.
|
|
|
09-21-2005, 05:45 PM
|
#14
|
LQ Newbie
Registered: Sep 2005
Posts: 4
Rep:
|
Aww, you guys are all brilliant! Lots of useful info here. I'm starting to see that grep is pretty cool! As is the concept of passing output from one command to another.
Thanks!

|
|
|
09-22-2005, 07:43 AM
|
#15
|
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337
Rep:
|
Quote:
Originally posted by Holf
Aww, you guys are all brilliant! Lots of useful info here. I'm starting to see that grep is pretty cool! As is the concept of passing output from one command to another.
Thanks!
|
That's the way the Unix Operating System is built. One program communicates with another very well. You could, for example, redirect the output of a command to a text file:
cat /etc/X11/xorg.conf > my_xorg_file
That will read the xorg file and write it to a text file called my_xorg_file. You can even redirect the error output of a command to a file. Error output redirection uses the right angle bracket, preceded by the number 2 (2>). It really is cool. For you to have an idea of the Linux/Unix way of redirecting things, think about your monitor. Your monitor is your standard output device. Typing "echo hello" on your terminal will display "hello" on your monitor. You can redirect the output of echo to another terminal instead. Open one terminal and run "ps -a". That will display the process you have at that terminal, like this:
Quote:
bash-3.00$ ps -a
PID TTY TIME CMD
14571 pts/1 00:00:00 ps
|
That shows that we are at pts/1. You can alternatively type "tty" too. Now, open a second terminal and on the new terminal, type:
echo hello > /dev/pts/1
you've just redirected the output from terminal 2 to terminal 1. And there's a whole lot more of funny things to do too
Regards!
Last edited by Mega Man X; 09-23-2005 at 12:21 AM.
|
|
|
All times are GMT -5. The time now is 01:09 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|