Compiling and Installing on Termux (Android)

Linux specific questions, problems.
Post Reply
DoctorNope

Compiling and Installing on Termux (Android)

Post by DoctorNope »

Hi all,

I'm trying to install qBittorrent on my tablet that's running Termux. It took a bit of fiddling, but I was able compile the program with the following commands.

Code: Select all

./configure --disable-gui --with-boost-libdir=/data/data/com.termux/file/usr/lib
make
However when I try to run make install, I get the following output.

Code: Select all

cd src/ && ( test -e Makefile || /data/data/com.termux/files/usr/bin/qmake -o Makefile /data/data/com.termux/files/home/apps/qBittorrent/src/src.pro QMAKE_LRELEASE= ) && make -f Makefile install
make[1]: Entering directory '/data/data/com.termux/files/home/apps/qBittorrent/src'
mkdir: cannot create directory ‘/usr’: Read-only file system
make[1]: *** [Makefile:13041: install_man] Error 1
make[1]: Leaving directory '/data/data/com.termux/files/home/apps/qBittorrent/src'
make: *** [Makefile:57: sub-src-install_subtargets] Error 2
I suspect this is due to the location of /usr. Termux runs on top of Android as an app. It can't access the root directory of the device and instead has it's own 'root' directory under /data/data/com.termux/files/. I probably need to change the directory for the installation, but I'm not that familiar with Make.

If it's possible to resolve this issue and I can successfully install qBittorrent on Termux, I'd be happy to add the instructions to the Wiki :).

Thank you.
userdocs

Re: Compiling and Installing on Termux (Android)

Post by userdocs »

Generally this will show you the options.

Code: Select all

./configure --help
You should specify the prefix to avoid this.

And you would do something like this to compile to the directory you have permission for.

Code: Select all

./configure --prefix=/com.termux/files/bin --disable-gui --with-boost-libdir=/data/data/com.termux/file/usr/lib
make
Post Reply