pip3安装av,但收到错误命令“x86_64linuxgnugcc”失败,退出状态为1

2024-06-26 00:30:53 发布

您现在位置:Python中文网/ 问答频道 /正文

最近我在努力

pip3 install av

但出现错误:命令“x86_64-linux-gnu-gcc”失败,退出状态为1。我如何解决这个问题?谢谢大家!

src/av/codec/codec.c: In function ‘__pyx_f_2av_5codec_5codec_get_codec_names’:
src/av/codec/codec.c:4014: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:4014: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:6125: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:6125:36: note: each undeclared identifier is reported only once for each function it appears in
src/av/codec/codec.c:6146: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-qywqltd2/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-xf05xm57-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-qywqltd2/av/

Tags: installinsrcyoufunctionerrorcodeccap
2条回答

请试试这个

sudo add-apt-repository ppa:jonathonf/ffmpeg-4
sudo apt upgrade

上述建议是根据所提供的资料提出的

通过安装依赖项,问题已经解决

apt安装libavdevice dev libavfilter dev libopus dev libvpx dev pkg config

apt安装libsrtp2 dev

相关问题 更多 >