Alternatively, you can install debian in a chroot as described here:
https://www.mobileread.com/forums/sho...d.php?t=203986
This takes up a lot of space, but installing Debian programs in the chroot is much easier because dependencies are correctly managed. (Plus, there is no risk of overwriting files and messing up the host system.)