I want to install a set of software organized into directories at the root level.

Is there any method in which I can use pacman to install certain packages into a directory of my choosing?


Yes, that's possible, by specifying a different root location,

-r, --root Specify an alternative installation root (default is /). This should not be used as a way to install software into /usr/local instead of /usr. This option is used if you want to install a package on a temporary mounted partition that is "owned" by another system. NOTE: if database path or logfile are not specified on either the command line or in pacman.conf(5), their default location will be inside this root path.

  • What should I do about the dbpath with that method? – Ayrx Oct 2 '12 at 9:46
  • @TerryChia you want to alternate where pacman stores information of installed packages? – daisy Oct 2 '12 at 9:52
  • No, but I got an error: failed to initialize alpm library (could not find or read directory), which from some googling - i assume to be an error with the dbpath. – Ayrx Oct 2 '12 at 9:56
  • @TerryChia Hmm, I think the '-r' is used to install a new system just like what the Installation Media does, I don't have a Arch at hand right now, will try it later. If this doesn't work, you're going to modify the PKGBUILD file, the XXX_install function defined there. (A prefix can be specified for most software based on autogen) – daisy Oct 3 '12 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.