Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issues on Ubuntu 18.4 #326

Closed
iscsrl opened this issue Mar 24, 2020 · 4 comments
Closed

Installation issues on Ubuntu 18.4 #326

iscsrl opened this issue Mar 24, 2020 · 4 comments
Labels
invalid This doesn't seem right

Comments

@iscsrl
Copy link

iscsrl commented Mar 24, 2020

I cannot make the pip install work.
My issue is:

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-sz1dte73/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-knt6xduz-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-sz1dte73/av/

I resolved the installation problem with "av" installing it at the version 6.2.0 but aiortc keeps trying to install latest version and i get that issue while installing the av dependency.
Any tips?

@iscsrl iscsrl changed the title Installation issues Installation issues on Ubuntu 18.4 Mar 24, 2020
@jlaine
Copy link
Collaborator

jlaine commented Mar 24, 2020

There is too little information for me to help here, don't you have a fuller error message?

@jlaine jlaine added the invalid This doesn't seem right label Mar 24, 2020
@BrettRD
Copy link

BrettRD commented Mar 25, 2020

Perhaps this error?

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/python3.6m -Iinclude -I/usr/include/x86_64-linux-gnu -Ibuild/temp.linux-x86_64-3.6/include -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
  src/av/codec/codec.c: In function ‘__pyx_pymod_exec_codec’:
  src/av/codec/codec.c:6061: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, 124, __pyx_L1_error)
                                      ^~~~~~~~~~~~~~~~~~~~~
                                      AV_CODEC_CAP_DR1
  src/av/codec/codec.c:6061:36: note: each undeclared identifier is reported only once for each function it appears in
  src/av/codec/codec.c:6082: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, 128, __pyx_L1_error)
                                      ^~~~~~~~~~~~~~~~~~~
                                      AV_CODEC_CAP_DR1
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for av
  Running setup.py clean for av
Failed to build av

Which probably relates to this ticket about attempting to pip3 install av with ffmpeg < 4
PyAV-Org/PyAV#604

Edit:
Doing a

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

will upgrade your ffmpeg to 4+ on your ubuntu18.04 and will make the av package behave itself.
It's working for me now.

@jlaine jlaine closed this as completed Mar 26, 2020
@jlaine
Copy link
Collaborator

jlaine commented Mar 26, 2020

Yes, it's explicitly documented in both aiortc and PyAV that FFmpeg 4 or better is needed

@pranav-bhatt
Copy link

pranav-bhatt commented Jul 30, 2020

For some people, the packages libavcodec-dev are old, so you would need to install ffmpeg AND upgrade other packages from Rob Savouy's PPA in order to sort this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants