星号汇编

Asterisk Compilation

我已经从 http://downloads.asterisk.org/pub/telephony/asterisk/ 下载了 Asterisk 的源代码。

我在尝试调用 make :

时从 Ubuntu 16.04.1 中的源代码编译它时遇到错误
./libasteriskssl.so: undefined reference to `CRYPTO_num_locks' collect2: error: ld returned 1 exit status Makefile:321: recipe for target 'asterisk' failed make[1]: * [asterisk] Error 1 Makefile:368: recipe for target 'main' failed make: * [main] Error 2

谢谢

您的 asterisk 版本不支持那个 libcrypto/openssl 版本,或者您已经破坏了 openssl 安装。

尝试不同的版本,作为参考从 RHEL/Centos 获取与您使用的源代码同年的版本。

正如@arheops 指出的那样,编译取决于 OS 的版本和 asterisk 本身的版本。以下在带有星号 v14

的 Debian 9 中有效

假设您在 /usr/src/asterisk 中有源代码。所以,首先要做的是。您必须下载依赖项:

# apt-get update
# apt-get install autoconf
# cd /usr/src/asterisk/contrib/scripts
# ./install_prereq install

然后,配置步骤:

# cd /usr/asterisk
# ./bootstrap.sh
# ./configure <your fancy options>
# make menuconfig

现在,编译阶段:

# make

安装可执行文件和库

# make install

安装配置模板

# make samples

安装服务

# make config