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

相关文章

大数据spark3.5安装部署之local模式详解

《大数据spark3.5安装部署之local模式详解》本文介绍了如何在本地模式下安装和配置Spark,并展示了如何使用SparkShell进行基本的数据处理操作,同时,还介绍了如何通过Spark-su... 目录下载上传解压配置jdk解压配置环境变量启动查看交互操作命令行提交应用spark,一个数据处理框架

Flask解决指定端口无法生效问题

《Flask解决指定端口无法生效问题》文章讲述了在使用PyCharm开发Flask应用时,启动地址与手动指定的IP端口不一致的问题,通过修改PyCharm的运行配置,将Flask项目的运行模式从Fla... 目录android问题重现解决方案问题重现手动指定的IP端口是app.run(host='0.0.

Seata之分布式事务问题及解决方案

《Seata之分布式事务问题及解决方案》:本文主要介绍Seata之分布式事务问题及解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Seata–分布式事务解决方案简介同类产品对比环境搭建1.微服务2.SQL3.seata-server4.微服务配置事务模式1

mysql关联查询速度慢的问题及解决

《mysql关联查询速度慢的问题及解决》:本文主要介绍mysql关联查询速度慢的问题及解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录mysql关联查询速度慢1. 记录原因1.1 在一次线上的服务中1.2 最终发现2. 解决方案3. 具体操作总结mysql

Python FastAPI入门安装使用

《PythonFastAPI入门安装使用》FastAPI是一个现代、快速的PythonWeb框架,用于构建API,它基于Python3.6+的类型提示特性,使得代码更加简洁且易于绶护,这篇文章主要介... 目录第一节:FastAPI入门一、FastAPI框架介绍什么是ASGI服务(WSGI)二、FastAP

一文教你解决Python不支持中文路径的问题

《一文教你解决Python不支持中文路径的问题》Python是一种广泛使用的高级编程语言,然而在处理包含中文字符的文件路径时,Python有时会表现出一些不友好的行为,下面小编就来为大家介绍一下具体的... 目录问题背景解决方案1. 设置正确的文件编码2. 使用pathlib模块3. 转换路径为Unicod

Spring MVC跨域问题及解决

《SpringMVC跨域问题及解决》:本文主要介绍SpringMVC跨域问题及解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录跨域问题不同的域同源策略解决方法1.CORS2.jsONP3.局部解决方案4.全局解决方法总结跨域问题不同的域协议、域名、端口

2025最新版Python3.13.1安装使用指南(超详细)

《2025最新版Python3.13.1安装使用指南(超详细)》Python编程语言自诞生以来,已经成为全球最受欢迎的编程语言之一,它简单易学易用,以标准库和功能强大且广泛外挂的扩展库,为用户提供包罗... 目录2025最新版python 3.13.1安装使用指南1. 2025年Python语言最新排名2.

SpringBoot自定义注解如何解决公共字段填充问题

《SpringBoot自定义注解如何解决公共字段填充问题》本文介绍了在系统开发中,如何使用AOP切面编程实现公共字段自动填充的功能,从而简化代码,通过自定义注解和切面类,可以统一处理创建时间和修改时间... 目录1.1 问题分析1.2 实现思路1.3 代码开发1.3.1 步骤一1.3.2 步骤二1.3.3

Python依赖库的几种离线安装方法总结

《Python依赖库的几种离线安装方法总结》:本文主要介绍如何在Python中使用pip工具进行依赖库的安装和管理,包括如何导出和导入依赖包列表、如何下载和安装单个或多个库包及其依赖,以及如何指定... 目录前言一、如何copy一个python环境二、如何下载一个包及其依赖并安装三、如何导出requirem