現: 2010-06-28 (月) 22:21:50 nao-pon[3] [4] | |||
---|---|---|---|
Line 1: | Line 1: | ||
+ | #navi | ||
+ | RIGHT:&rsslink(../); | ||
+ | #boxdate | ||
+ | * ffmpeg-php の configure でハマる [error: ffmpeg headers not found.] [#y0bf9314] | ||
+ | RIGHT:&tag(自宅サーバー,ffmpeg); | ||
+ | |||
+ | 動画をPHPで扱いたいと思い、ffmpeg + ffmpeg-php を Web サーバーにインストールしようと思ったところ、ffmpeg-php の configure で、ハマってしまったので、その解決メモ。 | ||
+ | |||
+ | Vine 5.1 でパッケージがないか検索したら、"self-build-ffmpeg" があったので、インストール。 | ||
+ | |||
+ | ただし、次のように段階的にインストールしないと、依存関係で上手くいかない。 | ||
+ | |||
+ | # apt-get install self-build-setup | ||
+ | # apt-get install self-build-xvidcore self-build-faac self-build-lame self-build-x264 self-build-libdca self-build-a52dec self-build-libdvdcss | ||
+ | # apt-get install self-build-ffmpeg self-build-ffmpeg-mh self-build-mplayer self-build-mplayer-codecs | ||
+ | |||
+ | - [[self-build によるマルチメディア環境の構築(MPlayer, FFmpeg 編) - がべこれログ - Garbage Collection Log:http://d.hatena.ne.jp/munepi/20080310/1205167630]] | ||
+ | |||
+ | ここまでは、まあググリながらなんとかOK。(ビルドしながらのインストールになるので、めっちゃ時間が掛かった) | ||
+ | |||
+ | 次に、ffmpeg-php をインストールしようと、 | ||
+ | |||
+ | # tar xjf ffmpeg-php-0.6.0.tbz2 | ||
+ | # cd ffmpeg-php-0.6.0 | ||
+ | # phpize | ||
+ | # ./configure | ||
+ | |||
+ | としたところで問題発生! | ||
+ | |||
+ | checking for ffmpeg support... yes, shared | ||
+ | checking whether to force gd support in ffmpeg-php... no | ||
+ | checking for ffmpeg headers... | ||
+ | configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option | ||
+ | |||
+ | とエラーで止まってしまう。 | ||
+ | "checking for ffmpeg support... yes, shared" とある通り shared が有効になっているにも関わらず、"Make sure ffmpeg is compiled as shared libraries using the --enable-shared option" って。 | ||
+ | |||
+ | いろいろ、ググッた結果、どうやら header ファイルを見つけられない模様。いろいろ試した結果、ffmpeg の configure の --incdir で指定したディレクトリ直下に *.h ファイルがないとエラーになるようだったので以下を実行。(自分の環境では "--incdir=/usr/include/ffmpeg") | ||
+ | |||
+ | # cp /usr/include/ffmpeg/libavcodec/*.h /usr/include/ffmpeg | ||
+ | # cp /usr/include/ffmpeg/libavdevice/*.h /usr/include/ffmpeg | ||
+ | # cp /usr/include/ffmpeg/libavfilter/*.h /usr/include/ffmpeg | ||
+ | # cp /usr/include/ffmpeg/libavformat/*.h /usr/include/ffmpeg | ||
+ | # cp /usr/include/ffmpeg/libavutil/*.h /usr/include/ffmpeg | ||
+ | # cp /usr/include/ffmpeg/libpostproc/*.h /usr/include/ffmpeg | ||
+ | # cp /usr/include/ffmpeg/libswscale/*.h /usr/include/ffmpeg | ||
+ | |||
+ | これで、無事に configure が通り、 | ||
+ | |||
+ | # make | ||
+ | # make-install | ||
+ | |||
+ | で無事にインストール完了。 :ok: | ||
+ | |||
+ | ふうっ。疲れた。 | ||
+ | |||
+ | RIGHT:&font(90%){&page_comments;}; | ||
+ | #navi |
(This host) = https://xoops.hypweb.net