2013-01-10 104 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

相關問題