Asterisk 21.2.0编译安装经常遇到的问题和解决办法之pjproject风云再起

本文主要是介绍Asterisk 21.2.0编译安装经常遇到的问题和解决办法之pjproject风云再起,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

目录

  • pjproject问题的另外一种形式
  • 上传文件来解决
  • 关于pjproject 为什么要用指定版本的

pjproject问题的另外一种形式

在反复测试Asterisk 21.2.0版本安装的时候,在 ./configure 的时候又遇到一个跟pjproject有关的问题,错误提示信息是这样的:

checking for embedded pjproject (may have to download)… configuring
[pjproject] Verifying /tmp/pjproject-2.14.tar.bz2
[pjproject] Verify failed
[pjproject] Retrying download
[pjproject] Downloading https://raw.githubusercontent.com/asterisk/third-party/master/pjproject/2.14/pjproject-2.14.tar.bz2 to /tmp/pjproject-2.14.tar.bz2
[pjproject] Unpacking /tmp/pjproject-2.14.tar.bz2

bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? Possible reason follows.
bzip2: Inappropriate ioctl for device
Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted. You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover’ program to attempt to recover data from undamaged sections of corrupted files.

/usr/bin/tar: Child returned status 2
/usr/bin/tar: Error is not recoverable: exiting now
mv: cannot stat ‘pjproject-2.14’: No such file or directory
make: *** [source/.unpacked] Error 1
failed
configure: Unable to configure third-party/pjproject
configure: error: Re-run the ./configure command with ‘NOISY_BUILD=yes’ appended to see error details.

马上去检查pjproject-2.14.tar.bz2 文件,发现文件大小不对。
只有去把这个文件删除了再重新configure

 rm -f /tmp/pjproject-2.14.tar.bz2

这样反复几次 ./configure ,还是会下载一个错误大小的文件。
这个应该还是跟网络有关,下载数据不完整,有丢包。

上传文件来解决

另外找一台电脑,下载pjproject-2.14.tar.bz2 文件,然后再上传到这台机器,重新 ./configure 就过了:

checking for embedded pjproject (may have to download)… configuring
[pjproject] Verifying /tmp/pjproject-2.14.tar.bz2
[pjproject] Verify successful
[pjproject] Unpacking /tmp/pjproject-2.14.tar.bz2
[pjproject] Applying patches /usr/src/asterisk-21.2.0/third-party/pjproject/patches /usr/src/asterisk-21.2.0/third-party/pjproject/source
[pjproject] Applying user.mak
[pjproject] Rebuilding
[pjproject] Applying custom include file patches/config_site.h
[pjproject] Applying custom include file patches/asterisk_malloc_debug.h
[pjproject] Configuring with --with-ssl --prefix=/opt/pjproject --disable-speex-codec --disable-speex-aec --disable-bcg729 --disable-gsm-codec --disable-ilbc-codec --disable-l16-codec --disable-g722-codec --disable-g7221-codec --disable-opencore-amr --disable-silk --disable-opus --disable-video --disable-v4l2 --disable-sound --disable-ext-sound --disable-sdl --disable-libyuv --disable-ffmpeg --disable-openh264 --disable-ipp --disable-libwebrtc --without-external-pa --without-external-srtp --disable-resample --disable-g711-codec --enable-epoll
checking for bundled pjproject… yes

我把这个bz2文件上传了,在本文开头可以下载这个文件。然后上传到/tmp目录下就行了。

关于pjproject 为什么要用指定版本的

有人说不用指定版本的pjsip不行吗?每次升级Asterisk都要升级pjsip真麻烦。Asterisk官方从可预测性扩展性可用性安全性可维护性可调试性兼容性可靠性等8个方面做了回应。可以自己体会一下原文:

Why use the bundled version?
Predictability: When built with the bundled pjproject, you’re always certain of the version you’re running against, no matter where it’s installed.
Scalability: The default pjproject configuration is optimized for client applications. The bundled version’s configuration is optimized for server use.
Usability: Several feature patches, which have been submitted upstream to pjproject but not yet released, are usually included in the bundled version.
Safety: If a security or critical issue is identified in pjproject, it can be patched and made available with a new release of Asterisk instead of having to waiting for a new release of pjproject.
Maintainability: You don’t need to build and install separate packages. Supportability: When asking others for help, there’s no question about which version of pjproject you’re using and what options it was compiled with.
Debugability: The Asterisk DONT_OPTIMIZE and MALLOC_DEBUG compile flags, which are essential for troubleshooting crashes and deadlocks, are automatically passed to the pjproject build process.
Compatibility: This is especially important from a development perspective because it means we can be sure that new pjproject APIs that have been introduced or old ones that have been deprecated, are handled and tested appropriately in Asterisk.
Reliability: You can be sure that Asterisk was tested against the bundled version.

pjproject

这篇关于Asterisk 21.2.0编译安装经常遇到的问题和解决办法之pjproject风云再起的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/896863

相关文章

python管理工具之conda安装部署及使用详解

《python管理工具之conda安装部署及使用详解》这篇文章详细介绍了如何安装和使用conda来管理Python环境,它涵盖了从安装部署、镜像源配置到具体的conda使用方法,包括创建、激活、安装包... 目录pytpshheraerUhon管理工具:conda部署+使用一、安装部署1、 下载2、 安装3

关于@MapperScan和@ComponentScan的使用问题

《关于@MapperScan和@ComponentScan的使用问题》文章介绍了在使用`@MapperScan`和`@ComponentScan`时可能会遇到的包扫描冲突问题,并提供了解决方法,同时,... 目录@MapperScan和@ComponentScan的使用问题报错如下原因解决办法课外拓展总结@

MybatisGenerator文件生成不出对应文件的问题

《MybatisGenerator文件生成不出对应文件的问题》本文介绍了使用MybatisGenerator生成文件时遇到的问题及解决方法,主要步骤包括检查目标表是否存在、是否能连接到数据库、配置生成... 目录MyBATisGenerator 文件生成不出对应文件先在项目结构里引入“targetProje

C#使用HttpClient进行Post请求出现超时问题的解决及优化

《C#使用HttpClient进行Post请求出现超时问题的解决及优化》最近我的控制台程序发现有时候总是出现请求超时等问题,通常好几分钟最多只有3-4个请求,在使用apipost发现并发10个5分钟也... 目录优化结论单例HttpClient连接池耗尽和并发并发异步最终优化后优化结论我直接上优化结论吧,

Java内存泄漏问题的排查、优化与最佳实践

《Java内存泄漏问题的排查、优化与最佳实践》在Java开发中,内存泄漏是一个常见且令人头疼的问题,内存泄漏指的是程序在运行过程中,已经不再使用的对象没有被及时释放,从而导致内存占用不断增加,最终... 目录引言1. 什么是内存泄漏?常见的内存泄漏情况2. 如何排查 Java 中的内存泄漏?2.1 使用 J

numpy求解线性代数相关问题

《numpy求解线性代数相关问题》本文主要介绍了numpy求解线性代数相关问题,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧... 在numpy中有numpy.array类型和numpy.mat类型,前者是数组类型,后者是矩阵类型。数组

Spring常见错误之Web嵌套对象校验失效解决办法

《Spring常见错误之Web嵌套对象校验失效解决办法》:本文主要介绍Spring常见错误之Web嵌套对象校验失效解决的相关资料,通过在Phone对象上添加@Valid注解,问题得以解决,需要的朋... 目录问题复现案例解析问题修正总结  问题复现当开发一个学籍管理系统时,我们会提供了一个 API 接口去

解决systemctl reload nginx重启Nginx服务报错:Job for nginx.service invalid问题

《解决systemctlreloadnginx重启Nginx服务报错:Jobfornginx.serviceinvalid问题》文章描述了通过`systemctlstatusnginx.se... 目录systemctl reload nginx重启Nginx服务报错:Job for nginx.javas

龙蜥操作系统Anolis OS-23.x安装配置图解教程(保姆级)

《龙蜥操作系统AnolisOS-23.x安装配置图解教程(保姆级)》:本文主要介绍了安装和配置AnolisOS23.2系统,包括分区、软件选择、设置root密码、网络配置、主机名设置和禁用SELinux的步骤,详细内容请阅读本文,希望能对你有所帮助... ‌AnolisOS‌是由阿里云推出的开源操作系统,旨

Redis缓存问题与缓存更新机制详解

《Redis缓存问题与缓存更新机制详解》本文主要介绍了缓存问题及其解决方案,包括缓存穿透、缓存击穿、缓存雪崩等问题的成因以及相应的预防和解决方法,同时,还详细探讨了缓存更新机制,包括不同情况下的缓存更... 目录一、缓存问题1.1 缓存穿透1.1.1 问题来源1.1.2 解决方案1.2 缓存击穿1.2.1