ubuntu 22.04编译安装linphone-desktop 4.5.0-alpha版本

本文介绍linphone-desktop当前最新版本在unbuntu 22.04系统上的编译安装及打包步骤,具体过程是参考gitlab上的readme,不过遇到不少坑,所以专门记录一下。

链接如下:

https://gitlab.linphone.org/BC/public/linphone-desktop
https://gitee.com/poseidom/linphone-desktop

1、安装依赖

##本文所有shell命令执行都是用root用户执行,如非root用户请加sudo
##因为我用的是ubuntu-server,因此这里还要先安装下ubuntu-desktop
apt install ubuntu-desktop
apt update
apt upgrade

apt install yasm nasm doxygen perl git pkg-config python3-pip cmake v4l-utils libv4l-dev libx11-dev libpulse-dev pulseaudio apulse

apt install mesa-common-dev libglu1-mesa-dev libegl1-mesa-dev

##然后用pip3 install安装pystache和six:
pip3 install pystache six

2、下载并运行安装qt5

我们这里用qt 5.14.2版本,下载网址是 https://download.qt.io/archive/qt/5.14/5.14.2/,我们系统是unbutu,所以下载 qt-opensource-linux-x64-5.14.2.run这个包。
下载到桌面后,在图形界面右键点击后设置权限加上可执行权限,然后双击安装,记得用root用户,非root需要在终端打开后加sudo执行。选择组件的时候,除了默认的Tools,另外勾选上Desktop gcc 64-bit和sources。
设置环境变量,设置完记得重启机器:
vim /etc/profile
##在结尾添加如下三行:
export PATH="/opt/Qt5.14.2/Tools/QtCreator/bin:$PATH"
export PATH="/opt/Qt5.14.2/5.14.2/gcc_64/bin:$PATH"
export PATH="/opt/Qt5.14.2/5.14.2/gcc_64:$PATH"

3、编译linphone-desktop

依次执行下面命令进行编译安装:
##首先拉取源码
git clone https://gitlab.linphone.org/BC/public/linphone-desktop.git --recursive
##从git拉取慢的话,可以从码云这里拉取:git clone --recursive https://gitee.com/poseidom/linphone-desktop.git

##接下来就是开始编译了
cd linphone-desktop
mkdir build
cd build
cmake .. -DCMAKE_BUILD_PARALLEL_LEVEL=10 -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build . --target install --parallel 10 --config RelWithDebInfo

//如果第一步cmake就报错的话,提示“No CMAKE_CXX_COMPILER could be found.”,则可能是没有安装编译环境,执行apt-get install build-essential安装。

//另外可以在第一个cmake的时候带很多参数,如选择是否编译支持G729编码等等。

上面最后一个cmake --build如果执行成功的话,就是编译完成了。

需要注意,上面最后一步要求是编译用的机器有声卡才可以,否则会卡在报错“Could not find a support sound driver API”。根据提示即使在第一个cmake的时候带上-DENABLE_SOUND=NO,后面第二个cmake还是会报错。

编译完以后,在ubuntu图形界面,可以到linphone-desktop/build目录执行如下指令即可尝试启动linphone:
./OUTPUT/bin/linphone --verbose

4、打包程序 - 利用AppImage打包

上面linphone-desktop编译的install目录就是build/OUTPUT,可以直接在OUTPUT/bin下找到linphone可执行程序启动linphone。
而要在编译的同时,把编译结果打包成程序,根据README提示,需要cmake .. -DENABLE_APP_PACKAGING=YES。因此可以按下面步骤操作。
首先缺个fuse2依赖,需要安装下,否则build的时候会报错:
apt install libfuse2

接下来在linphone-desktop/build目录下,重新执行两条cmake命令进行打包:

cmake .. -DCMAKE_BUILD_PARALLEL_LEVEL=10 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_APP_PACKAGING=YES
cmake --build . --target install --parallel 10 --config RelWithDebInfo

最后输出如下结果,就是打包成功:
[appimage/stderr] Please consider submitting your AppImage to AppImageHub, the crowd-sourced
[appimage/stderr] central directory of available AppImages, by opening a pull request
[appimage/stderr] at https://github.com/AppImage/appimage.github.io
[appimage/stdout] /root/linphone-desktop/build/WORK/Packages/AppImageDir/AppDir should be packaged as Linphone-3488f97e-x86_64.AppImage

然后查看对应的存放打包程序的目录build/OUTPUT/Packages,可以看到打包完成的AppImage:

root@myubt:~/linphone-desktop# ls -lhtr build/OUTPUT/Packages/
total 172M
-rwxr-xr-x 1 root root 172M Oct 19 04:40 Linphone-4.5.0-alpha.326+3488f97e.AppImage

//打包过程也要联网,会访问gitlab下载打包工具linuxdeploy-x86_64.AppImage。

5、客户端运行

把打包好的AppImage(我们这里是Linphone-4.5.0-alpha.326+3488f97e.AppImage),拷贝到新的ubuntu-desktop或其它linux图形桌面并赋予执行权限,然后安装libfuse依赖后(AppImage运行需要fuse,有些系统内置了就不需要安装),即可成功打开运行linphone-desktop。
apt install libfuse2

首先需要赋予AppImage可执行权限:

然后即可打开运行linphone-desktop:

测试拨打电话:

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
要搭建和配置Asterisk服务器并在Ubuntu 22.04 LTS上使用它,可以按照以下步骤进行操作: 1. 首先,确保已经安装Ubuntu 22.04 LTS,并且网络连接稳定。 2. 使用终端命令更新系统软件包。在终端中输入以下命令: sudo apt update && sudo apt upgrade 3. 安装Asterisk服务器。在终端中输入以下命令: sudo apt install asterisk 4. 安装完成后,可以使用以下命令启动Asterisk服务: sudo systemctl start asterisk 5. 配置Asterisk服务器。配置文件位于/etc/asterisk目录下。你可以编辑配置文件进行个性化设置,如添加SIP帐号、密码等。 sudo nano /etc/asterisk/sip.conf 6. 保存并退出配置文件。然后重新启动Asterisk服务以使更改生效: sudo systemctl restart asterisk 7. 验证Asterisk服务器是否正常工作: - 在终端中输入以下命令启动Asterisk命令行界面: sudo asterisk -r - 在命令行界面中输入以下命令验证连接状态: sip show connections - 如果显示已连接的SIP帐号信息,则表示Asterisk服务器正常工作。 8. 在本地网络中的其他设备上,可以使用SIP软电话客户端(如Linphone)连接到Asterisk服务器,并拨打测试电话号码进行测试。 请注意,以上步骤仅提供了Asterisk服务器搭建和配置的基本步骤,你可能需要进行进一步的设置和调整,以满足你的特定需求。建议详细阅读Asterisk文档以获取更多的配置和使用信息。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值