If running CentOS or Fedora, first reboot. This is to ensure that the kernel running matches the kernel source installed.
To install Asterisk from source, along with supporting packages: