python-librtmp icon indicating copy to clipboard operation
python-librtmp copied to clipboard

"fatal error: 'librtmp/rtmp.h' file not found", multiple installs failed, Mac OS X 10.9,

Open kendog77 opened this issue 11 years ago • 24 comments
trafficstars

"fatal error: 'librtmp/rtmp.h' file not found"

Hi, another one having troubles installing python-librtmp to Mac OS X, I tried a few different calls/methods for the install (pip, easy_install, etc) but always get the same error: librtmp_ffi/__pycache__/_binding.c:186:14: fatal error: 'librtmp/rtmp.h' file not found

I'm using Mac OS X, Mavericks 10.9.4, and am needing to install python-librtmp as requested by 'livestreamer' when trying to access UStream: [cli][info] Found matching plugin ustreamtv for URL http://www.ustream.tv/channel/11655601 [plugin.ustreamtv][warning] python-librtmp is not installed, but is needed to access the desktop streams [cli][info] Available streams: mobile_240p (worst), mobile_360p, mobile_480p (best) ...then it only offers the 'mobile' streams, which work well enough, I'm just not allowed to access the 'desktop' streams/resolutions..

cffi installed fine, but python-librtmp does not.

I've read somewhere to try to install it to Mac OS X with homebrew, but so far I've not been successful with that method either.. (total n00b to Homebrew), still looking into that method.

Any help would be amazing, I'm only new to all of this, I've only ever done ultra basic terminal etc coding before. Already so damn happy to get livestreamer sending live video streams to VLC, and being able to record live events that are on at like 2am here in Sydney, Australia, so I can sleep and watch later.

PS- Massive props to all of you guys who put so much effort in to these communities for the greater good and to help us all out!!

kendog77 avatar Jul 23 '14 04:07 kendog77

I am having the same issue. I even tried to do it all on a clean install with cffi, cc, homebrew and just about any method and it is always missing librtmp/rtmp.h

Anybody have some advice, help, trick, fix or just about anything that might get it installed?

Shriukan avatar Aug 12 '14 10:08 Shriukan

Anybody have some advice, help, trick, fix or just about anything that might get it installed?

Does the workaround described here work?

chrippa avatar Aug 17 '14 14:08 chrippa

Actually it didn't. It kept giving me the exact same mistake despite me pointing the correct folders.

jimmys-mbp:python-librtmp jimmy$ python setup.py build_ext -I /Users/jimmy/python-librtmp/rtmpdump/rtmpdump/librtmp -L usr/local/lib install running build_ext building '_binding' extension cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/Users/jimmy/python-librtmp/rtmpdump/rtmpdump/librtmp -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c librtmp_ffi/pycache/_binding.c -o build/temp.macosx-10.9-intel-2.7/librtmp_ffi/pycache/_binding.o librtmp_ffi/pycache/_binding.c:186:14: fatal error: 'librtmp/rtmp.h' file not found #include <librtmp/rtmp.h> ^ 1 error generated. error: command 'cc' failed with exit status 1

Shriukan avatar Aug 18 '14 00:08 Shriukan

Those paths doesn't look correct... According to the homebrew docs it should be installing things in /usr/local, so perhaps this will work:

sudo python setup.py build_ext -I /usr/local/include -L /usr/local/lib install

chrippa avatar Aug 18 '14 17:08 chrippa

Nope. Didn't work either. I'm already accepting my fate. I'll just keep going to the site I guess. Everything else works without any problems though so keep up the good work :) Good luck with the Twitch VoD issue.

Shriukan avatar Aug 18 '14 19:08 Shriukan

I just wanted to chime in that I am having this exact same issue. My machine is OSX 10.8.2 and I just can't figure out how to install. Shriukan if you found a solution please do report back. For now I am having to fire up a virtual box of Windows just to get higher resolution and would rather do it through osx.

danshaw avatar Aug 31 '14 15:08 danshaw

Any status updates? I'm also experiencing this issue at the moment.

vyvey avatar Oct 31 '14 19:10 vyvey

Nope. Still nothing. Wouldn't it be possible to have that file added with the installer right away?

Shriukan avatar Nov 08 '14 23:11 Shriukan

Any updates? Sill broken on OSX for me :(

ggilmore avatar Mar 02 '15 15:03 ggilmore

Tried yesterday on Yosemite 10.10.3 and still broken. I was able to manually find librtmp/rtmp.h in the /usr/local/include path. Not sure why the build script can't find it.

karasline avatar May 19 '15 13:05 karasline

same here

piejanssens avatar Jun 17 '15 13:06 piejanssens

i've installed rtmpdump via brew brew install rtmpdump

it works for me

theo-ptz avatar Jul 10 '15 11:07 theo-ptz

I'll check it out this weekend

piejanssens avatar Jul 10 '15 12:07 piejanssens

Can confirm brew install rtmp dump works !

josephmartin09 avatar Dec 20 '15 05:12 josephmartin09

pip install --global-option=build_ext --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib" python-librtmp

This works for me!

Akagi201 avatar Apr 13 '16 08:04 Akagi201

@theo-ptz thanks!

larryhu avatar May 10 '16 03:05 larryhu

I was having this problem because I was using the brew python/pip to install python-librtmp. After brew install rtmpdump, I usedeasy_install to install pip and then pip to install python-librtmp.

azunymous avatar Aug 19 '16 12:08 azunymous

I used

sudo apt-get install librtmp-dev sudo pip install python-librtmp

Worked like a charm

dpappas avatar May 08 '17 12:05 dpappas

Thanks @dpappas very cool...

VajiraPrabuddhaka avatar Sep 01 '17 04:09 VajiraPrabuddhaka

I have the same problem。 It's need install librtmp. Following this: git clone git://git.ffmpeg.org/rtmpdump cd rtmpdump/librtmp/ make && make install cp librtmp.so.1 /usr/lib64/

kamixueti avatar Oct 23 '17 06:10 kamixueti

I used

sudo apt-get install librtmp-dev sudo pip install python-librtmp

Worked like a charm

Thank you. That actually works. I should be mentioned in the ReadMe.

MarvinThiele avatar Mar 04 '20 16:03 MarvinThiele

from the terminal: $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null $ brew install rtmpdump

Samer78 avatar Apr 27 '20 22:04 Samer78

@Akagi201 trick didn't quite work for me. I suspect it might be I have an M1 MacBook. However, the following did:

pip install --global-option=build_ext --global-option="-I/opt/homebrew/opt/rtmpdump/include/" --global-option="-L/opt/homebrew/opt/rtmpdump/lib" python-librtmp

Note that the location of the library and includes are different.

fergbrain avatar Oct 26 '22 21:10 fergbrain