I am a non-admin user on a large computer system. I need some up to date packages that are not installed on the system. I want to use yum to install them. As a user without sudo, admin, or root access, can I use package management to install packages in my home directory? I can always use make from the sources, but being able to use yum will make life easier.
Yum Install – How to Install in User Home for Non-Admins
rpmyum
Related Solutions
One option to achieve your goal is to "roll" your own RPM. It's not a trivial task, but once you understand the process, it can be done fairly painlessly in just a few steps (depending on the level of sophistication required for the software). I have to install a lot of built from source software for my customers, and I find that when possible, taking the time to create an RPM is administratively beneficial over the life of the software. I still control the build process, I just take the effort a step further and wrap up the built software into a tidy RPM package.
From my experience, benefits of installing the software as an RPM include
- Users are able to query the RPM database to find out information about the installed software
- I can easily push the package out to multiple machines via a custom
yum
repository - Installation and removal of the software becomes simplistic
- I can take advantage of all the benefits of using the RPM package manager
- I am able to keep different versions of the software "in archive" by keeping the RPM and SRPM files
- I can share my efforts of a custom built RPM with a wider community
The Fedora Project wiki has a good tutorial explaining the process and steps to create a custom RPM. This is a great starting point and gives you an idea of the power available to you when customizing your own RPM.
While common package managers don't address this use case, there are several projects that do:
- Zero Install
- Linuxbrew - a port of Homebrew for Linux
- Gentoo Prefix
- Nix
- pkgsrc - can be used to install packages as an unprivileged user according to somebody's blog post
My best guess as to why traditional package managers don't address this use case is that it greatly complicates the package building and installation process, since package maintainers will need to be very careful to ensure that their packages correctly support a dynamic installation directory. In fact, many common package formats such as RPM support a dynamic installation directory, but hardly any maintainers take advantage of this feature when building packages due to the high additional overhead.
Best Answer
Most binaries are compiled to be installed into certain locations under
/
.There are non-root package managers like Gentoo Prefix and Rootless GoboLinux and maybe 0install.
As you said compiling yourself would alleviate that issue, or using a chroot. However, your biggest hurdle with chrooting will be the prerequisites and linking to kernel shared objects.