1

I have Debian wheezy chrooted in my Android. However all its directory is in my internal memory. So, if I apt-get install something, it gets installed in /data/data/.../debian/usr/local/bin directory.

I have bound my external sd under /sdcard/sdext2 in Debian.

I can access it by cd /sdcard/sdext2 and verified with ls that it is ok.

I would like to have Debian install apps under /sdcard/sdext2/usr/local/bin instead of /usr/local/bin. How can I do that without moving the whole root directory?

2

Debian does not install anything into /usr/local, in the sense that official Debian packages are forbidden to touch that hierarchy. Also, Debian packages can assume absolute installation paths, so they may not work correctly if moved by hand (or by somehow tricking dpkg into installing them into a different hierarchy).

On the other hand, software packages using the GNU Autotools build system (ie. those you install by ./configure && make && sudo make install) indeed use the /usr/local hierarchy by default, and you can override that:

$ ./configure --prefix=/sdcard/sdext2/usr/local

You may want to override other default directories, too. Browse the output of ./configure --help for those not influenced by --prefix.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.