无法安装 ffvideo

无法安装 ffvideo
Downloading/unpacking ffvideo
  Downloading FFVideo-0.0.13.tar.gz (47kB): 47kB downloaded
  Running setup.py (path:/home/doublespring/.virtualenvs/team/build/ffvideo/setup.py) egg_info for package ffvideo

Installing collected packages: ffvideo
  Running setup.py install for ffvideo
    building 'ffvideo' extension
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/ffmpeg -I/usr/include/python2.7 -c ffvideo/ffvideo.c -o build/temp.linux-x86_64-2.7/ffvideo/ffvideo.o
    ffvideo/ffvideo.c:254:32: fatal error: libavutil/rational.h: No such file or directory
     #include "libavutil/rational.h"
                                    ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    Complete output from command /home/doublespring/.virtualenvs/team/bin/python -c "import setuptools, tokenize;__file__='/home/doublespring/.virtualenvs/team/build/ffvideo/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-baqEa_-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/doublespring/.virtualenvs/team/include/site/python2.7:
    running install

running build

running build_ext

building 'ffvideo' extension

creating build

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/ffvideo

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/ffmpeg -I/usr/include/python2.7 -c ffvideo/ffvideo.c -o build/temp.linux-x86_64-2.7/ffvideo/ffvideo.o

ffvideo/ffvideo.c:254:32: fatal error: libavutil/rational.h: No such file or directory

 #include "libavutil/rational.h"

                                ^

compilation terminated.

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

----------------------------------------
Cleaning up...

答案1

最可能的问题(部分可能是软件包中的错误)是您缺少一些依赖包。让我们尝试教您如何找出这些问题...

安装apt-file 并加载其数据库

sudo apt-get install apt-file
sudo apt-file update

搜索缺失的文件:

[romano:~] % apt-file search libavutil/rational.h
libavutil-dev: /usr/include/libavutil/rational.h
libmyth-dev: /usr/include/mythtv/libavutil/rational.h

这意味着有两个包提供了一个libavutil/rational.h文件。第二个是myth-tv--- 非常专业的东西的一部分。因此,导致您出现错误最可能的原因是缺少第一个:

 sudo apt-get install libavutil-dev

...然后再试一次。

相关内容