I have a piece of software which I would like to install in a separate hierarchy beneath
$HOME/local on an Ubuntu 16.04 machine.
The software is distributed as a Debian package, and the source code is not available (I would happily have downloaded it and compiled it myself had it been).
I don't have (and should not have)
sudo access on the machine I'm attempting this on. The software is not to be installed system-wide, but only for my personal use.
I tried to
$ dpkg --root="$HOME/local" -i package_x.y.z_x86_64.deb
but I get
dpkg: error: requested operation requires superuser privilege
After trying with
--force-all and creating all the necessary files and directories needed to satisfy
local/var/dpkg with subdirectories
updates, along with an empty
status file in
local/var/dpkg), I get stuck with
$ dpkg --root=$HOME/local -i --force-all package-x.y.z_x86_64.deb dpkg: could not open log '/var/log/dpkg.log': Permission denied (Reading database ... 0 files and directories currently installed.) Preparing to unpack package_x.y.z_x86_64.deb ... Unpacking package (1:x.y.z) ... dpkg: error processing archive package_x.y.z_x86_64.deb (--install): error setting ownership of './usr/bin/application': Operation not permitted dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: package_x.y.z_x86_64.deb
It's obviously failing to
chown the files to the correct users in accordance with the package specification.
The next step for me would probably be to have a talk with the sysadmins on this machine to see if they could install this software for me, but I wonder if there's something I've missed that would have allowed me to have my own local package installation root?