This is a quick quide for install Asteirsk 10.5.0 in OSX Lion 10.7.4. Let’s get started
Since Asterisk is not part of homebrew anymore, the best way to install Asterisk is compiling it from source. Which presents another issue specially if your running XCode 4.2+ because gcc-4.2 was removed from it’s toolchains.
I strongly suggest you download and install osx-gcc-installer and Apple’s Command Line Tools to be able to run this source compiles properly. After installing those requirements, your brew —config should look at least like this, which indicates that you have GCC-4.2 installed.
Download the latest stable release from Asterisk, which is 10.5.0
wget -N -c http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-10.5.0.tar.gz tar -zxvf asterisk-10.5.0.tar.gz cd asterisk-10.5.0
Here’s where the magic begins:
CC=/usr/bin/gcc-4.2 ./configure --host=x86_64-darwin
You need to pass your compiler which is gcc-4.2 in the configure command so that the generated Makefile will use it.
Remove res_snmp under Resource Modules. Hit Q then S to save the settings. Then run:
sudo make sudo make install sudo make samples
Here’s a quick screencast for the whole installation process: Here