Covers building, installing, running models with llama-server, and complete uninstallation of llama.cpp.
1.2 KiB
1.2 KiB
Install llama.cpp
This recipe builds and installs llama.cpp from source on Debian/Ubuntu, including build dependencies and the llama-server binary.
Install Build Dependencies
sudo apt update
sudo apt install -y build-essential cmake git libcurl4-openssl-dev
Clone Repository
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
Build Project
cmake -B build
cmake --build build --config Release -j $(nproc)
Install Binaries
sudo cmake --install build
sudo ldconfig
Verify Installation
llama-server --version
Expected output:
version: xxxx (xxxxxxxx)
Verify Binary Location
which llama-server
Expected output:
/usr/local/bin/llama-server
Troubleshooting
Command not found
Verify that the binary was installed.
ls /usr/local/bin/llama-server
If it is missing, repeat the build and install steps.
Build fails with missing dependency
Verify the build dependencies are installed.
dpkg -l | grep -E "build-essential|cmake|libcurl4-openssl-dev"
If any are missing, repeat the dependency installation step.