LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 09-21-2005, 07:10 AM   #1
Gald3r
LQ Newbie
 
Registered: Sep 2005
Location: Athens, Greece
Distribution: RedHat 9
Posts: 24

Rep: Reputation: 15
Unhappy 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.
 
Old 09-21-2005, 07:27 AM   #2
SkyEye
Member
 
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
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.
 
Old 09-21-2005, 07:27 AM   #3
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
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.
 
Old 09-21-2005, 07:30 AM   #4
Sm1ler
Member
 
Registered: Apr 2004
Location: UK
Distribution: Fedora Core (all), Knoppix, RHEL, Centos, Debian
Posts: 100

Rep: Reputation: 16
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
 
Old 09-21-2005, 07:31 AM   #5
Gald3r
LQ Newbie
 
Registered: Sep 2005
Location: Athens, Greece
Distribution: RedHat 9
Posts: 24

Original Poster
Rep: Reputation: 15
Hmmmm... I see. And How do I execute it once I find it?
 
Old 09-21-2005, 07:46 AM   #6
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
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...
 
Old 09-21-2005, 07:51 AM   #7
SkyEye
Member
 
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441

Rep: Reputation: 40
You can see a list of installed files and where they are by this
Code:
rpm -q pakage_name --filesbypkg
 
Old 09-21-2005, 08:28 AM   #8
Gald3r
LQ Newbie
 
Registered: Sep 2005
Location: Athens, Greece
Distribution: RedHat 9
Posts: 24

Original Poster
Rep: Reputation: 15
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
 
Old 09-21-2005, 11:22 AM   #9
Holf
LQ Newbie
 
Registered: Sep 2005
Posts: 4

Rep: Reputation: 0
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
 
Old 09-21-2005, 02:20 PM   #10
Gald3r
LQ Newbie
 
Registered: Sep 2005
Location: Athens, Greece
Distribution: RedHat 9
Posts: 24

Original Poster
Rep: Reputation: 15
I second Holf's thoughts. You were all very helpful. Thank you again.
 
Old 09-21-2005, 02:53 PM   #11
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
@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!
 
Old 09-21-2005, 04:19 PM   #12
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
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.
 
Old 09-21-2005, 04:24 PM   #13
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
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.
 
Old 09-21-2005, 05:45 PM   #14
Holf
LQ Newbie
 
Registered: Sep 2005
Posts: 4

Rep: Reputation: 0
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!


 
Old 09-22-2005, 07:43 AM   #15
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rpm cannot find installed dependencies guitarfella Slackware 1 02-23-2005 04:24 AM
rpm can't find installed dependencies? jbeiter Linux - General 4 09-17-2004 03:53 PM
redhat 9: i canīt find my installed rpmīs dirtgirl666 Linux - Software 12 08-09-2003 11:19 AM
installed mplayer from rpm and can't find it messenjah Linux - Software 3 07-17-2003 10:24 AM
Installed RPM/tar file, cant find out how to run it Craneology Linux - Software 4 03-01-2003 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration