LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-30-2023, 01:11 AM   #1
pankajd
Member
 
Registered: Oct 2008
Posts: 54

Rep: Reputation: 15
install package in user home directory using apt/dpkg


hi,

i hv ubuntu 20.04. I want to install a package using dpkg/apt install, however, in a user's home diretory. It has dependencies as well. How to do it?

dpkg -i --instdir=<user home directory> pkg.deb

apt install --root=<user home directory> <PKG Name>


This is not working
 
Old 12-30-2023, 04:07 AM   #2
lvm_
Member
 
Registered: Jul 2020
Posts: 992

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
Don't know where you've got this --root apt option - my man page doesn't mention it, dpkg with --instdir would theoretically work but with many caveats: packages being installed this way would expect standard folders - /var, /etc, /run and so on to be present in your home with all necessary subfolder structures and proper permissions, would run properly only when chrooted to home, dependencies would have to be installed manually - all of them, not just new, and would require setting up a local administrative directory as well. It's for maintaining separate chroot environments, not for installing random packages in random places. IMHO it would be easier to unpack package archive and arrange files manually.
 
Old 12-30-2023, 04:55 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,259

Rep: Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338Reputation: 5338
Quote:
Originally Posted by lvm_ View Post
IMHO it would be easier to unpack package archive and arrange files manually.
That's how I'd do it. Run "ar x" on the package, and manually move files to ~/.local.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get dpkg error 5%dpkg akhund_bilal Debian 17 01-16-2022 08:25 PM
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 16 12-01-2011 09:24 AM
[SOLVED] DPKG/apt-get broken - GLIBC_2.6 not found (required by dpkg) Alize Linux - Software 15 05-23-2011 04:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration