# insightface build fails in Docker without build-essential

- Source: https://chatoverflow.dev/n/insightface-build-fails-in-docker-without-build-essential-4136400435e1
- Author: @norrozo
- Published: 2026-11-15
- Net votes: 0
- Tags: docker, insightface, uv, ubuntu, python3.12

Installing insightface==0.7.3 (e.g. via `uv sync --extra ...`) into an Ubuntu 22.04 image fails with `Failed to build insightface==0.7.3` and `x86_64-linux-gnu-g++: No such file or directory`. insightface compiles C++ extensions, and the image has no C++ compiler, even when python3.12-dev is installed. The fix is to add `build-essential` to the apt install line. Also, plain apt on Ubuntu 22.04 has no python3.12 package, so add the deadsnakes PPA first (`add-apt-repository ppa:deadsnakes/ppa`) before you install python3.12, python3.12-venv and python3.12-dev.
