2013-01-10 106 views
1

我正在尝试在Ubuntu Desktop 12.04 LTS上安装rmovie gemffmpeg已安装,但我得到这个错误:无法在安装rmovie gem时创建gem本机扩展

$ gem install rmovie 
Building native extensions. This could take a while... 
ERROR: Error installing rmovie: 
    ERROR: Failed to build gem native extension. 

     /home/ror_dev/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb 
gcc -c -fpic -g qp_movie.c -o qp_movie.o 
In file included from qp_movie.c:4:0: 
qp_util.h:4:28: fatal error: ffmpeg/avcodec.h: No such file or directory 
compilation terminated. 
make: *** [qp_movie.o] Error 1 
checking for avcodec_init() in -lavcodec... yes 
checking for av_register_all() in -lavformat... yes 
checking for quadrupel_init() in -lquadrupel... no 
*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers. Check the mkmf.log file for more 
details. You may need configuration options. 

Provided configuration options: 
    --with-opt-dir 
    --with-opt-include 
    --without-opt-include=${opt-dir}/include 
    --with-opt-lib 
    --without-opt-lib=${opt-dir}/lib 
    --with-make-prog 
    --without-make-prog 
    --srcdir=. 
    --curdir 
    --ruby=/home/ror_dev/.rvm/rubies/ruby-1.9.3-p362/bin/ruby 
    --with-ffmpeg-dir 
    --without-ffmpeg-dir 
    --with-ffmpeg-include 
    --without-ffmpeg-include=${ffmpeg-dir}/include 
    --with-ffmpeg-lib 
    --without-ffmpeg-lib=${ffmpeg-dir}/lib 
    --with-quadrupel-dir 
    --without-quadrupel-dir 
    --with-quadrupel-include 
    --without-quadrupel-include=${quadrupel-dir}/include 
    --with-quadrupel-lib 
    --without-quadrupel-lib=${quadrupel-dir}/lib 
    --with-avcodeclib 
    --without-avcodeclib 
    --with-avformatlib 
    --without-avformatlib 
    --with-quadrupellib 
    --without-quadrupellib 
extconf failed: need quadrupel library 

第一次尝试搬迁avcodec中到安装程序寻找它。没有成功。接下来 - 修正四字节文件中的路径,将其指向avcodec所在的位置。没有成功。

什么是这个quadrupel的东西,以及如何强制它的工作?

或者也许有一些替代rmovie?

+0

https://github.com/streamio/streamio-ffmpeg似乎是一个更好的选择,它是更积极的发展。 rmovie是在2006年开发的,它可能不兼容当前版本的ffmpeg – d33pika

+0

谢谢@ d33pika! 'streamio-ffmpeg'是我需要的!发表您的评论作为答案,我会尽可能选择它。 – Dmitry

回答

0

做这样的 -

1)保持创业板的Gemfile中 -

gem "rmovie", "~> 0.5.1" 

2)运行bundle install

如果仍然出现错误尝试:

sudo apt-get install ffmpeg libavcodec-extra-52 

如果未找到包裹请尝试:

sudo apt-get install ffmpeg libavcodec-extra-53 

你也可以尝试安装libmp3lame0包:

sudo apt-get install libmp3lame0 
+0

做到了。有同样的错误:使用本机扩展安装rmovie(0.5.1) Gem :: Installer :: ExtensionBuildError:错误:无法构建gem本机扩展。 – Dmitry

+0

你在使用什么操作系统 - Windows还是Ubuntu? –

+0

Ubuntu桌面12.04 LTS – Dmitry

相关问题