安装 aiortc 出现的问题

本文详细记录了在安装aiortc过程中遇到的错误及解决方案,包括错误代码、可能的原因和具体的解决步骤,如更新ffmpeg版本等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装 aiortc 出现的问题


pip install aiortc

报错

tor-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/src/av/error.o -lswscale -lavcodec -lavutil -lavfilter -lavdevice -lswresample -lavformat -o build/lib.linux-x86_64-3.6/av/error.cpython-36m-x86_64-linux-gnu.so

[proxychains] DLL init: proxychains-ng 4.12

[proxychains] DLL init: proxychains-ng 4.12

[proxychains] DLL init: proxychains-ng 4.12

building 'av.frame' extension

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/x86_64-linux-gnu -Iinclude -Ibuild/temp.linux-x86_64-3.6/include -I/usr/include/python3.6m -I/usr/include/python3.6m -Ibuild/temp.linux-x86_64-3.6/include -c src/av/frame.c -o build/temp.linux-x86_64-3.6/src/av/frame.o

[proxychains] DLL init: proxychains-ng 4.12

[proxychains] DLL init: proxychains-ng 4.12

[proxychains] DLL init: proxychains-ng 4.12

x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/src/av/frame.o -lswscale -lavcodec -lavutil -lavfilter -lavdevice -lswresample -lavformat -o build/lib.linux-x86_64-3.6/av/frame.cpython-36m-x86_64-linux-gnu.so

[proxychains] DLL init: proxychains-ng 4.12

[proxychains] DLL init: proxychains-ng 4.12

[proxychains] DLL init: proxychains-ng 4.12

building 'av.codec.codec' extension

creating build/temp.linux-x86_64-3.6/src/av/codec

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/x86_64-linux-gnu -Iinclude -Ibuild/temp.linux-x86_64-3.6/include -I/usr/include/python3.6m -I/usr/include/python3.6m -Ibuild/temp.linux-x86_64-3.6/include -c src/av/codec/codec.c -o build/temp.linux-x86_64-3.6/src/av/codec/codec.o

[proxychains] DLL init: proxychains-ng 4.12

[proxychains] DLL init: proxychains-ng 4.12

src/av/codec/codec.c: In function ‘__pyx_f_2av_5codec_5codec_get_codec_names’:

src/av/codec/codec.c:4003:19: warning: implicit declaration of function ‘av_codec_iterate’; did you mean ‘av_codec_next’? [-Wimplicit-function-declaration]

__pyx_v_ptr = av_codec_iterate((&__pyx_v_opaque));

^~~~~~~~~~~~~~~~

av_codec_next

src/av/codec/codec.c:4003:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]

__pyx_v_ptr = av_codec_iterate((&__pyx_v_opaque));

^

src/av/codec/codec.c: In function ‘__pyx_pymod_exec_codec’:

src/av/codec/codec.c:6117:36: error: ‘AV_CODEC_CAP_HARDWARE’ undeclared (first use in this function); did you mean ‘AV_CODEC_CAP_DR1’?

__pyx_t_7 = __Pyx_PyInt_From_int(AV_CODEC_CAP_HARDWARE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 121, __pyx_L1_error)

^~~~~~~~~~~~~~~~~~~~~

AV_CODEC_CAP_DR1

src/av/codec/codec.c:6117:36: note: each undeclared identifier is reported only once for each function it appears in

src/av/codec/codec.c:6138:36: error: ‘AV_CODEC_CAP_HYBRID’ undeclared (first use in this function); did you mean ‘AV_CODEC_CAP_DR1’?

__pyx_t_7 = __Pyx_PyInt_From_int(AV_CODEC_CAP_HYBRID); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __pyx_L1_error)

^~~~~~~~~~~~~~~~~~~

AV_CODEC_CAP_DR1

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mseddytx/av/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-qb_p05v0-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-mseddytx/av/



需要 ffmpeg4 才行

sudo apt-get remove libavformat-dev libavfilter-dev libavcodec-dev libavutil-dev libavdevice-dev ffmpeg - y

sudo apt-get autoremove -y

sudo add-apt-repository ppa:savoury1/graphics

sudo add-apt-repository ppa:savoury1/multimedia

sudo add-apt-repository ppa:savoury1/ffmpeg4

sudo apt-get update

sudo apt-get install libavformat-dev libavfilter-dev libavcodec-dev libavutil-dev libavdevice-dev ffmpeg -y

参考:

https://launchpad.net/~savoury1/+archive/ubuntu/ffmpeg4

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值