- Linux or mostly POSIX.1-2001 compliant environment
- GNU make, CMake 2.6.2 or newer
- gcc 4.7 or newer or clang 3.0 or newer and latest libstdc++ or Boost headers
- on Linux systems, kernel 2.6.22 or newer and glibc 2.8 or newer
Optional development packages for optional features:
- zlib, libbz2, liblzma (from XZ), openssl and their development components
- recent FUSE library and its development files for the "virtual mirror"
Build and installation instructions:
- run "make"
- if an error occurs during configuration: read the message, solve the
problem, run "make distclean" and retry with "make"
- if a GCC internal compiler error appears, try:
make distclean ; make NOLTO=1
- when done, copy build/apt-cacher-ng and build/in.acng to /usr/local/sbin
Configure to run on system startup:
This heavily depends on the used init system.
- For systemd configuration files example, visit systemd directory and install
that config files as needed (check the services and tmpfiles directories of
your systemd setup).
- For sysvinit, see latest Debian package for examples (unpack with ar/tar or
- For use with Avahi, install contrib/apt-cacher-ng.service configuration
- create a directory for cached files and for log files
- set ownership and directory permissions in a way which allows
read/write/mkdir actions to the user account used to run apt-cacher-ng later
- copy conf directory to /etc/apt-cacher-ng or similar location.
- adapt acng.conf and other *.conf files in that configuration directory.
See user manual (doc/apt-cacher-ng.pdf or doc/README) for instructions.
- run apt-cacher-ng -c yourConfigurationDirectory
- visit Command-and-Control web interface of apt-cacher-ng, link can be found
among other instructions at http://yourHostName:portNumber/ , which might be
http://localhost:3142/ with the default configuration
- for apt clients, there is a config snipped in contrib/10-apt-cacher-ng.conf
which might be installed into /etc/apt/apt.conf.d/.
Certain variables can be passed to the make command via call arguments or
environment variables to customize the build.
- DEBUG=1 : creates binaries with additional debugging code included. Warning:
extremelly increased log size.
- CXX : overrides the default compiler (for example, CXX=clang++-3.6)
- CXXFLAGS : parameters passed to the compiler after the default ones
- LDFLAGS : parameters passed to the linker call (compiler call for linking)
- NOLTO : disables use of Link Time Optimization which is/was faulty in some
GCC version even if the basic function check succeeds