Common issues you may run into while compiling Asterisk, DAHDI, or LibPRI. Most of the issues you’ll run into have to do with missing dependencies. If that is the case, please review “Asterisk Software Dependencies” to make sure you’ve installed everything you need.
Note: Any time you install additional packages, you will need to run the ./configure script in your Asterisk source in order for the new package to be detected.
-bash: wget: command not found
This message means you have not installed the wget application, which is required for you to download packages from the Asterisk downloads site, for Asterisk to download sound files, or for DAHDI to download firmware for hardware.
ubuntu/Debian:
1 2 3 | $ sudo apt-get install wget |
CentOS/RedHat:
1 2 3 | $ sudo yum -y install wget |
configure: error: no acceptable C compiler found in $PATH
This means that the Asterisk configure script is unable to find your C compiler, which typically means you have not yet installed one. Be sure to install the gcc package for your system.
ubuntu/Debian:
1 2 3 | $ sudo apt-get install gcc |
CentOS/RedHat:
1 2 3 | $ sudo yum install gcc |
make: gcc: command not found
This means that the Asterisk configure script is unable to find your C compiler, which typically means you have not yet installed one. Be sure to install the gcc package for your system.
ubuntu/Debian:
1 2 3 | $ sudo apt-get install gcc |
CentOS/RedHat:
1 2 3 | $ sudo yum install gcc |
configure: error: C++ preprocessor “/lib/cpp” fails sanity check
This error is presented by the Asterisk configure script when you have not installed the GCC C++ preprocessor.
Ubuntu/Debian:
1 2 3 | $ sudo apt-get install g++ |
CentOS/RedHat:
1 2 3 | $ sudo yum install gcc-c++ |
configure: error: *** Please install GNU make. It is required to build Asterisk!
This error is encountered when you have not installed the make application, which is required to build Asterisk.
Ubuntu/Debian:
1 2 3 | $ sudo apt-get install make |
CentOS/RedHat:
1 2 3 | $ sudo yum install make |
configure: *** XML documentation will not be available because the ‘libxml2’ development package is missing.
You will encounter this error when the XML parser libraries are not installed. These are required by Asterisk 1.8 and later, since console documentation (e.g., when you run core show application dial on the Asterisk CLI) is generated from XML.
Ubuntu/Debian:
1 2 3 | $ sudo apt-get install libxml2-dev |
CentOS/RedHat:
1 2 3 | $ sudo yum install libxml2-devel |
configure: error: *** termcap support not found
This error happens when you don’t have the ncurses development library installed, which is required by menuselect and for other console output in Asterisk.
Ubuntu/Debian:
1 2 3 | $ sudo apt-get install ncurses-dev |
CentOS/RedHat:
1 2 3 | $ sudo yum install ncurses-devel |
You do not appear to have the sources for the 2.6.18-164.6.1.el5 kernel installed.
You will get this error when attempting to build DAHDI without having installed the Linux headers, which are required for building Linux drivers.
Ubuntu/Debian:
1 2 3 | $ sudo apt-get install linux-headers-`uname -r` |
CentOS/RedHat:
1 2 3 | $ sudo yum install kernel-devel |
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
If you encounter this error it’s likely that you forgot to prepend sudo to the start of the command you were running, which requires root permissions.