FreeSwitch(一):安装
# 总体环境:Ubuntu 20.04 LTS + freeswitch.1.10.5
# 第一步下载源代码:
git clone https://github.com/signalwire/freeswitch.git
#.Ubuntu 20.04 LTS 环境安装以下依赖:
apt-get -y install build-essential subversion automake autoconf wget libtool libtool-bin libncurse5-dev libssl-dev libsndfile-dev
# 编译安装
./bootstrap.sh
./configure (--enable-core-pgsql-support)
sudo
make
sudo
make install
# 由于安装的是最新版本fs.1.10.5,中途会提示你缺少spandsp,然后这玩意需要编译安装(https://github.com/freeswitch/sofia-sip 这里有教程)
git clone http://github.com/freeswitch/spandsp.git
./bootstrap.sh
./configure
sudo make
sudo make install
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH} 【正是缺少执行这条,导致我装失败好久】
ldconfig
可是,装完提示任然不存在。。。。救我。。。
#.安装sofia-sip
cd /usr/local/src/freeswitch-1.10.5.-release
git clone https://github.com/freeswitch/sofia-sip.git
cd sofia-sip
sh autogen.sh (if building from darcs)
./configure
make
make install
ldconfig
然后重新编译fs
# 接下来。。。。
环境:Ubuntu 20.04 LTS
一. 环境搭建:
Freeswitch依赖的包安装
sudo apt-get install git libcurl4-openssl-dev libexpat1-dev libssl-dev libtiff4-dev libx11-dev unixodbc-dev python-dev zlib1g-dev libzrtpcpp-dev libasound2-dev libogg-dev libvorbis-dev libperl-dev libgdbm-dev libdb-dev python-dev uuid-dev bison autoconf g++ libncurses-dev
二. 下载源码
git clone https://freeswitch.org/stash/scm/fs/freeswitch.git
三. 编译生成
./bootstrap.sh
./configure
在编译的时候, 遇到的问题:
错误1:
checking for sqlite3 >= 3.6.20...Package sqlite3 was not found in the pkg-config search path. Perhaps you shouldadd the directory containing `sqlite3.pc' to the PKG_CONFIG_PATH environmentvariable No package 'sqlite3' foundconfigure: error: Library requirements(sqlite3 >= 3.6.20) not met; consider adjusting the PKG_CONFIG_PATHenvironment variable if your libraries are in a nonstandard prefix sopkg-config can find them
解决:sudo apt-get install libsqlite3-dev
错误2:
checking for libpcre >= 7.8... Packagelibpcre was not found in the pkg-config search path. Perhaps you should add thedirectory containing `libpcre.pc' to the PKG_CONFIG_PATH environment variableNo package 'libpcre' found configure: error: Library requirements(libpcre >= 7.8) not met; consider adjusting the PKG_CONFIG_PATH environmentvariable if your libraries are in a nonstandard prefix so pkg-config can findthem.
解决:sudo apt-get install libpcre3-dev
错误3:
checking for speex >= 1.2rc1 speexdsp>= 1.2rc1... Package speex was not found in the pkg-config search path.Perhaps you should add the directory containing `speex.pc' to thePKG_CONFIG_PATH environment variable No package 'speex' found Package speexdspwas not found in the pkg-config search path. Perhaps you should add thedirectory containing `speexdsp.pc' to the PKG_CONFIG_PATH environment variableNo package 'speexdsp' found configure: error: Library requirements(speex >= 1.2rc1 speexdsp >= 1.2rc1) not met; consider adjusting thePKG_CONFIG_PATH environment variable if your libraries are in a nonstandardprefix so pkg-config can find them.
解决:sudo apt-get install libspeexdsp-dev
错误4:
checking for libldns >= 1.6.6...checking for ldns_str2rdf_a in -lldns... noconfigure: error: You need to either installlibldns-dev or disable mod_enum in modules.conf
解决:sudo apt-get install libldns-dev
错误5:
configure: error: You need to eitherinstall libedit-dev (>= 2.11) or configure with--disable-core-libedit-suppor
解决:sudo apt-get install libedit-dev
编译完成后执行
make;
sudo make install
在make时, 出现错误:
Neither yasm nor nasm have been found....
解决:sudo apt-get install yasm
错误6:
You must install libavformat-dev and libswscale-dev to build mod_av. Stop.
解决:
sudo apt-get install libavformat-dev libswscale-dev
错误:
sudo make 时,出现mod_lua.cpp:37:10: fatal error: lua.h: 没有那个文件或目录
解决:
sudo apt-get install liblua5.2-dev lua5.2(这玩意不能装5.3版本)
然后很重要的是,装完要重新执行./configure,不然不生效
还有个libks、signalwire-c、需要编译安装。。。。
重新make通过
#安装完成后,做两个链接到搜索路径中
ln -sf /usr/local/freeswitch/bin/freeswitch /usr/local/bin/
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/local/bin/
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构