Installation & Environment Setup
Termux-LlamaCpp provides two installation paradigms: Zero-Compilation Prebuilt Binary Installation (recommended default) and Manual Native Source Compilation.
1. Default Prebuilt Binary Installation (Recommended)
The automated installer downloads verified ARM64 binaries and bundled shared libraries directly to $HOME/.termux-llama/ and registers wrapper scripts in $PREFIX/bin/.
Bash Command (Android Termux)
# 1-Line Prebuilt Installation
curl -sSL https://raw.githubusercontent.com/uno-km/termux-llamacpp/master/scripts/install.sh | bash
| Installed File Path | File Type | Description |
|---|---|---|
$HOME/.termux-llama/bin/llama-server |
ELF 64-bit ARM64 | Native HTTP server binary compiled with NEON/DotProd SIMD flags. |
$HOME/.termux-llama/bin/llama-cli |
ELF 64-bit ARM64 | Interactive CLI text generation and prompt debugging binary. |
$HOME/.termux-llama/lib/*.so* |
Shared Libraries | Bundled dependency libraries (libllama.so, libggml.so, libllama-server-impl.so). |
$PREFIX/bin/llama-server |
Bash Wrapper | Executable wrapper configuring dedicated LD_LIBRARY_PATH resolution. |
$PREFIX/bin/llama-cli |
Bash Wrapper | Executable wrapper for direct CLI command access from any directory. |
2. Dual Ecosystem Package Installation (Python & Node.js)
For developers integrating with existing Python or JavaScript/TypeScript codebases:
Package Managers
# Python (PyPI)
pip install termux-llamacpp
# Node.js (npm)
npm install termux-llamacpp
3. Manual Pinned-Commit Source Compilation (--from-source)
For custom hardware architectures or developers compiling locally from the pinned upstream commit:
Source Compilation Option
# Compiles from pinned commit 5e6a37cb115dc1074e274ac004373f5661909695
bash scripts/install.sh --from-source
4. Verification & Diagnostic Doctor
Verify installation health and inspect Android SIMD hardware capabilities:
Verification Command
termux-llama doctor
# or
termux-llama hardware