LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Rpm file questions (https://www.linuxquestions.org/questions/linux-general-1/rpm-file-questions-4175449881/)

theKbStockpiler 02-12-2013 04:16 PM

Rpm file questions
 
I was wondering if it matters where a rpm file is located when it is installed using
Quote:

rpm -ivh package-name
I usually put it in the home directory. Does it have to be and can I delete it after I install the rpm file? Does it matter what directory BASH is in when it is installed?

Thanks in advance!:hattip:

Kustom42 02-12-2013 04:27 PM

Quote:

Originally Posted by theKbStockpiler (Post 4890226)
I was wondering if it matters where a rpm file is located when it is installed

Absolutely not! However, you should make sure that you are pathing to the right place. If I do a wget on an rpm, I then do a:

Code:

rpm -ivh ./rpmfile.rpm
instead of just

Code:

rpm -ivh rpmfile.rpm
Relying on your BASH $PATH variable is not always 100% reliable.

Quote:

Originally Posted by theKbStockpiler (Post 4890226)

I usually put it in the home directory. Does it have to be and can I delete it after I install the rpm file? Does it matter what directory BASH is in when it is installed?

Does not matter where you are at when you install it and you can safely delete after installing. The spec files for RPMs tell the package manager where the files are supposed to go and what to do with them. You can do an rpm --list to see what files it will install and where.

blue_print 02-12-2013 04:32 PM

You can keep the RPM file anywhere (but not in /lib, /dev, /proc, /sys :) ). But if you execute the command from one place and the rpm is in another location, you will need to give the path to the RPM file. Example, the RPM "a.rpm" is located in /tmp and you're in /home/.


rpm -ivh a.rpm -> Doesn't work
rpm -ivh /tmp/a.rpm - Works
cd /tmp;rpm -ivh a.rpm - Works

Yes, you can delete the rpm file after the installation.


All times are GMT -5. The time now is 03:56 AM.