How to apt install only on one user account?

I need to install a few packages on a server, but I need them to be available through only one user's account.

More specifically, I have a developer who will use those packages for testing some stuff before installing them system wide. I am running on Ubuntu 18.04. Is there any way to do it?

2

1 Answer

apt by definition installs everything system-wide.

You can download the .deb packages and install them with dpkg --root=... into some other tree, but then this tree will not be recognized by the system, and you'll have to manually fiddle with library configurations etc.

You can also create your own system tree using chroot, but again this is a lot of trouble, and you'll need to copy a good part of your installed system.

All of this is fairly involved. So the simplest way is "don't try to make it available to just one user". Instead, clone your complete server, run it in a VM etc., and have your developer test things this way. This has the additional advantage that he'll be testing with a setup identical to a production setup, so there'll be no surprises.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like