apt install with dependencies without root
For instance xournal++ seems to require dependencies on Ubuntu 18.04 (at least on IPOL computation server).
.deb Approach of the Ask Ubuntu answer 350:
In ~/xournalpp/usr/bin/:
./xournal
./xournal: error while loading shared libraries: libgnomecanvas-2.so.0: cannot open shared object file: No such file or directory
An idea can consists in solving dependencies by hand by dpkg -x package.deb . can hope that dependencies will be discoverable by xournal but how to apt-get download and dpkg -x cleanly in a single command?
Bash script:
PACKAGE=xournal++
DEB_FILE_NAME=`apt-get download $PACKAGE --print-uris | awk '{print $2}'`
apt download $PACKAGE
dpkg -x "$DEB_FILE_NAME" .
rm "$DEB_FILE_NAME"
libgnomecanvas2-dev results in:
ls -lh usr/lib/x86_64-linux-gnu/
Output:
total 428K
-rw-r--r-- 1 bloison bloison 421K Oct 21 2016 libgnomecanvas-2.a
lrwxrwxrwx 1 bloison bloison 28 Oct 21 2016 libgnomecanvas-2.so -> libgnomecanvas-2.so.0.3000.3
drwxr-xr-x 2 bloison bloison 4.0K Oct 21 2016 pkgconfig
The issue is that libgnomecanvas-2.so.0.3000.3 does not exist.
apt install ./libgnomecanvas2-dev_2.30.3-3_amd64.deb
Output:
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
For the apt-get source Approach, see #5.
+2
Edited by Benjamin Loison