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

相关文章

Redis 热 key 和大 key 问题小结

《Redis热key和大key问题小结》:本文主要介绍Redis热key和大key问题小结,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录一、什么是 Redis 热 key?热 key(Hot Key)定义: 热 key 常见表现:热 key 的风险:二、

IntelliJ IDEA 中配置 Spring MVC 环境的详细步骤及问题解决

《IntelliJIDEA中配置SpringMVC环境的详细步骤及问题解决》:本文主要介绍IntelliJIDEA中配置SpringMVC环境的详细步骤及问题解决,本文分步骤结合实例给大... 目录步骤 1:创建 Maven Web 项目步骤 2:添加 Spring MVC 依赖1、保存后执行2、将新的依赖

Spring 中的循环引用问题解决方法

《Spring中的循环引用问题解决方法》:本文主要介绍Spring中的循环引用问题解决方法,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录什么是循环引用?循环依赖三级缓存解决循环依赖二级缓存三级缓存本章来聊聊Spring 中的循环引用问题该如何解决。这里聊

Spring Boot中JSON数值溢出问题从报错到优雅解决办法

《SpringBoot中JSON数值溢出问题从报错到优雅解决办法》:本文主要介绍SpringBoot中JSON数值溢出问题从报错到优雅的解决办法,通过修改字段类型为Long、添加全局异常处理和... 目录一、问题背景:为什么我的接口突然报错了?二、为什么会发生这个错误?1. Java 数据类型的“容量”限制

关于MongoDB图片URL存储异常问题以及解决

《关于MongoDB图片URL存储异常问题以及解决》:本文主要介绍关于MongoDB图片URL存储异常问题以及解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录MongoDB图片URL存储异常问题项目场景问题描述原因分析解决方案预防措施js总结MongoDB图

SpringBoot项目中报错The field screenShot exceeds its maximum permitted size of 1048576 bytes.的问题及解决

《SpringBoot项目中报错ThefieldscreenShotexceedsitsmaximumpermittedsizeof1048576bytes.的问题及解决》这篇文章... 目录项目场景问题描述原因分析解决方案总结项目场景javascript提示:项目相关背景:项目场景:基于Spring

解决Maven项目idea找不到本地仓库jar包问题以及使用mvn install:install-file

《解决Maven项目idea找不到本地仓库jar包问题以及使用mvninstall:install-file》:本文主要介绍解决Maven项目idea找不到本地仓库jar包问题以及使用mvnin... 目录Maven项目idea找不到本地仓库jar包以及使用mvn install:install-file基

最详细安装 PostgreSQL方法及常见问题解决

《最详细安装PostgreSQL方法及常见问题解决》:本文主要介绍最详细安装PostgreSQL方法及常见问题解决,介绍了在Windows系统上安装PostgreSQL及Linux系统上安装Po... 目录一、在 Windows 系统上安装 PostgreSQL1. 下载 PostgreSQL 安装包2.

usb接口驱动异常问题常用解决方案

《usb接口驱动异常问题常用解决方案》当遇到USB接口驱动异常时,可以通过多种方法来解决,其中主要就包括重装USB控制器、禁用USB选择性暂停设置、更新或安装新的主板驱动等... usb接口驱动异常怎么办,USB接口驱动异常是常见问题,通常由驱动损坏、系统更新冲突、硬件故障或电源管理设置导致。以下是常用解决

Maven如何手动安装依赖到本地仓库

《Maven如何手动安装依赖到本地仓库》:本文主要介绍Maven如何手动安装依赖到本地仓库问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、下载依赖二、安装 JAR 文件到本地仓库三、验证安装四、在项目中使用该依赖1、注意事项2、额外提示总结一、下载依赖登