Install package without root privileges and compiling to specific directory

I would like to automatically install the required software in a shell script if it is not already present. I would like to use apt-get to install software (my example is gedit) to a specific directory without using root privileges and without running additional program specific scripts for compiling the software.

I tried the approach from (last post from user172681) with the example of gedit, but it results in an error.

Example:

cd test
apt-get download gedit

Get:1 trusty/main gedit amd64 3.10.4-0ubuntu4 [478 kB] Fetched 478 kB in 0s (3.356 kB/s)

ls

gedit_3.10.4-0ubuntu4_amd64.deb

dpkg -i --force-not-root --root=~/test gedit_3.10.4-0ubuntu4_amd64.deb

dpkg: error: unable to access dpkg status area: No such file or directory

Any ideas ?

1

2 Answers

dpkg -i gedit_3.10.4-0ubuntu4_amd64.deb --force-not-root --root=~/test 

You have not provided the filename where it expects the filename, so it throws the error "no such file or directory".

1

I actually made a tool for this purpose I really hope it helps someone just see the readme

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