本文主要是介绍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.bz2bzip2: 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.
这篇关于Asterisk 21.2.0编译安装经常遇到的问题和解决办法之pjproject风云再起的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!