1

我正在尝试在 Ubuntu Desktop 12.04 LTS 上安装rmovie gem 。ffmpeg已安装,但出现此错误:

$ 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 所在的位置。没有成功。

这是什么四重物以及如何强制它工作?

或者也许有一些替代 rmovie?

4

2 回答 2

1

使用github.com/streamio/streamio-ffmpeg,它的开发更加活跃。rmovie是 2006 年开发的,可能与当前版本不兼容ffmpeg

于 2013-01-12T06:09:41.593 回答
0

这样做 -

1) 将 gem 保存在 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
于 2013-01-10T12:46:20.050 回答