• Post Reply Bookmark Topic Watch Topic
  • New Topic

RPM install  RSS feed

 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to install the RPM at /usr/local directory. Is there a command to install at a specified location

Thanks in advance
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mary,

Have you tried the --relocate option? you should be able to sub the /usr/local for the original location. Something like:
 
Tim Holloway
Saloon Keeper
Posts: 18800
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing to remember is that RPMs are designed specifically to be able to splatter files all over your filesystem. And to find them later for updating, repair and/or removal. A tarball install to /usr/local was the more traditional approach, but adding dozens of /usr/local/packagename/bin's to the PATH - not to mention MAN base directories, etc-file maintenance, and such just got to be too much.

However, there are times when people don't like the default places where RPMs want to put things, and for the most part, that's fine. At least as long as the RPM author made sure that relocatability rules were obeyed.

The --relocate option only relocates files in the path indicated. Run "rpm -qilp packagename.rpm" on your package and you'll see what files (and what paths) will be installed. If you have other files besides those in the /usr/bin directory that also need relocation, you'll need additional --relocate's for them as well.

The RPM man page doesn't say if the option '--relocate /=/usr/local' works, but I expect it would.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!