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

相关文章

kali linux 无法登录root的问题及解决方法

《kalilinux无法登录root的问题及解决方法》:本文主要介绍kalilinux无法登录root的问题及解决方法,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,... 目录kali linux 无法登录root1、问题描述1.1、本地登录root1.2、ssh远程登录root2、

SpringBoot应用中出现的Full GC问题的场景与解决

《SpringBoot应用中出现的FullGC问题的场景与解决》这篇文章主要为大家详细介绍了SpringBoot应用中出现的FullGC问题的场景与解决方法,文中的示例代码讲解详细,感兴趣的小伙伴可... 目录Full GC的原理与触发条件原理触发条件对Spring Boot应用的影响示例代码优化建议结论F

如何在pycharm安装torch包

《如何在pycharm安装torch包》:本文主要介绍如何在pycharm安装torch包方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录在pycharm安装torch包适http://www.chinasem.cn配于我电脑的指令为适用的torch包为总结在p

在PyCharm中安装PyTorch、torchvision和OpenCV详解

《在PyCharm中安装PyTorch、torchvision和OpenCV详解》:本文主要介绍在PyCharm中安装PyTorch、torchvision和OpenCV方式,具有很好的参考价值,... 目录PyCharm安装PyTorch、torchvision和OpenCV安装python安装PyTor

Python Transformer 库安装配置及使用方法

《PythonTransformer库安装配置及使用方法》HuggingFaceTransformers是自然语言处理(NLP)领域最流行的开源库之一,支持基于Transformer架构的预训练模... 目录python 中的 Transformer 库及使用方法一、库的概述二、安装与配置三、基础使用:Pi

MySQL 中查询 VARCHAR 类型 JSON 数据的问题记录

《MySQL中查询VARCHAR类型JSON数据的问题记录》在数据库设计中,有时我们会将JSON数据存储在VARCHAR或TEXT类型字段中,本文将详细介绍如何在MySQL中有效查询存储为V... 目录一、问题背景二、mysql jsON 函数2.1 常用 JSON 函数三、查询示例3.1 基本查询3.2

Pyserial设置缓冲区大小失败的问题解决

《Pyserial设置缓冲区大小失败的问题解决》本文主要介绍了Pyserial设置缓冲区大小失败的问题解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面... 目录问题描述原因分析解决方案问题描述使用set_buffer_size()设置缓冲区大小后,buf

resultMap如何处理复杂映射问题

《resultMap如何处理复杂映射问题》:本文主要介绍resultMap如何处理复杂映射问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录resultMap复杂映射问题Ⅰ 多对一查询:学生——老师Ⅱ 一对多查询:老师——学生总结resultMap复杂映射问题

java实现延迟/超时/定时问题

《java实现延迟/超时/定时问题》:本文主要介绍java实现延迟/超时/定时问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Java实现延迟/超时/定时java 每间隔5秒执行一次,一共执行5次然后结束scheduleAtFixedRate 和 schedu

idea maven编译报错Java heap space的解决方法

《ideamaven编译报错Javaheapspace的解决方法》这篇文章主要为大家详细介绍了ideamaven编译报错Javaheapspace的相关解决方法,文中的示例代码讲解详细,感兴趣的... 目录1.增加 Maven 编译的堆内存2. 增加 IntelliJ IDEA 的堆内存3. 优化 Mave