Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is it possible to install a .deb package completely under my home directory at debian?

share|improve this question

migrated from stackoverflow.com Jul 24 '11 at 16:22

This question came from our site for professional and enthusiast programmers.

    
You could build a deb package that installs anywhere. But why would you want to? Packages are supposed to be installed into the system. –  Faheem Mitha Jul 24 '11 at 16:30
3  
@Faheem Mitha - We don't all have root access to our Unix boxes you know, I certainly don't where I work. If we need a package (RPM in my case) to use some piece of software, it would be nice if we could install it in user space rather than have to speak to I.T. and get them to install the package on the system for us. –  Mark Booth Jul 25 '11 at 12:26

3 Answers 3

It depends what you mean by "install". It is possible to extract the file contents of a .deb file using dpkg-deb -x <filename.deb>, but whether you can actually use the software after extracting it locally depends on how it is written. A lot of Linux software will be expecting to find its resource files in standard locations specified at compile-time, such as /usr/share or /usr/lib, which will fail if the software is not installed in the usual location. Also any system-wide configuration files installed by the package, such as .desktop files that create entries in the start menu, will not function as intended if installed in the wrong location.

share|improve this answer
1  
it should be dpkg-deb -x app.deb /path/to/target/dir/ –  qed May 10 '13 at 22:21

Note that use of the Debian package system requires root access. So, installing a deb package in a users home directory requires root access. If you have root access, then makes more sense to just install into the system as normal.

If you don't have root access, you can't use the Debian packaging system. You could certainly unpack a deb file into its component pieces and stick it in your home directory, but doing so would make little sense imo. I suggest you go with a local install. Depending on what software you are installing,the software may have some sort of internal package management system you can use.

share|improve this answer
up vote 1 down vote accepted

Thanks for all your comments an answers. It was a self-packaged piece of software where I would like to make some basic checks if my packaging was correct. I am root on my computer but wouldn't like to do a real installation there nor want to use a virtual image for the moment. I came up with this solution: http://serverfault.com/questions/23734/is-there-any-way-to-get-apt-to-install-packages-to-my-home-directory Which perfectly works for me atm.

share|improve this answer
    
@Ivogel asks "The page you linked to has many posts, and I can't tell which one is the solution that worked for you. Could you please specify?" –  drs Nov 12 at 13:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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