linuxサーバーに、linux-brewをインストールし、brew install ffmpegでffmpegをインストールしようとした際に、下記のエラーが発生します。
linux
1Last 15 lines from /home/bitnami/.cache/Homebrew/Logs/flex/02.make: 2gcc-8 -DHAVE_CONFIG_H -I. -DLOCALEDIR=\"/home/bitnami/.linuxbrew/Cellar/flex/2.6.4_2/share/locale\" -g -O2 -c -o stage1flex-yylex.o `test -f 'yylex.c' || echo './'`yylex.c 3/bin/bash ../libtool --tag=CC --mode=link gcc-8 -g -O2 -version-info 2:0:0 -o libfl.la -rpath /home/bitnami/.linuxbrew/Cellar/flex/2.6.4_2/lib libmain.lo libyywrap.lo -lm 4libtool: link: gcc-8 -shared -fPIC -DPIC .libs/libmain.o .libs/libyywrap.o -lm -g -O2 -Wl,-soname -Wl,libfl.so.2 -o .libs/libfl.so.2.0.0 5libtool: link: (cd ".libs" && rm -f "libfl.so.2" && ln -s "libfl.so.2.0.0" "libfl.so.2") 6libtool: link: (cd ".libs" && rm -f "libfl.so" && ln -s "libfl.so.2.0.0" "libfl.so") 7libtool: link: ar cru .libs/libfl.a libmain.o libyywrap.o 8ar: `u' modifier ignored since `D' is the default (see `U') 9libtool: link: ranlib .libs/libfl.a 10libtool: link: ( cd ".libs" && rm -f "libfl.la" && ln -s "../libfl.la" "libfl.la" ) 11/bin/bash ../libtool --tag=CC --mode=link gcc-8 -g -O2 -o stage1flex stage1flex-scan.o stage1flex-buf.o stage1flex-ccl.o stage1flex-dfa.o stage1flex-ecs.o stage1flex-filter.o stage1flex-gen.o stage1flex-main.o stage1flex-misc.o stage1flex-nfa.o stage1flex-options.o stage1flex-parse.o stage1flex-regex.o stage1flex-scanflags.o stage1flex-scanopt.o stage1flex-skel.o stage1flex-sym.o stage1flex-tables.o stage1flex-tables_shared.o stage1flex-tblcmp.o stage1flex-yylex.o -lm 12libtool: link: gcc-8 -g -O2 -o stage1flex stage1flex-scan.o stage1flex-buf.o stage1flex-ccl.o stage1flex-dfa.o stage1flex-ecs.o stage1flex-filter.o stage1flex-gen.o stage1flex-main.o stage1flex-misc.o stage1flex-nfa.o stage1flex-options.o stage1flex-parse.o stage1flex-regex.o stage1flex-scanflags.o stage1flex-scanopt.o stage1flex-skel.o stage1flex-sym.o stage1flex-tables.o stage1flex-tables_shared.o stage1flex-tblcmp.o stage1flex-yylex.o -lm 13./stage1flex -o stage1scan.c ./scan.l 14make[1]: *** [Makefile:1696: stage1scan.c] Segmentation fault 15make[1]: Leaving directory '/tmp/flex-20210728-16209-1ftcxr4/flex-2.6.4/src' 16make: *** [Makefile:533: install-recursive] Error 1 17 18READ THIS: https://docs.brew.sh/Troubleshooting 19
また、brew doctorを実行した場合は下記の情報が記載されます。
Linux
1Warning: Some installed formulae are deprecated or disabled. 2You should find replacements for the following formulae: 3 guile@2 4 5Warning: "config" scripts exist outside your system or Homebrew directories. 6`./configure` scripts often look for *-config scripts to determine if 7software packages are installed, and which additional flags to use when 8compiling and linking. 9 10Having additional scripts in your path can confuse software installed via 11Homebrew if the config script overrides a system or Homebrew-provided 12script of the same name. We found the following "config" scripts: 13 /opt/bitnami/apache/bin/apr-1-config 14 /opt/bitnami/apache/bin/apu-1-config 15 /opt/bitnami/apache2/bin/apr-1-config 16 /opt/bitnami/apache2/bin/apu-1-config 17 /opt/bitnami/python/bin/python3-config 18 /opt/bitnami/python/bin/python3.8-config 19 20Warning: Your Homebrew's prefix is not /home/linuxbrew/.linuxbrew. 21Some of Homebrew's bottles (binary packages) can only be used with the default 22prefix (/home/linuxbrew/.linuxbrew). 23You will encounter build failures with some formulae. 24Please create pull requests instead of asking for help on Homebrew's GitHub, 25Twitter or any other official channels. You are responsible for resolving 26any issues you experience while you are running this 27unsupported configuration.
brewのアップデートやアップグレード、doctorででたwarningの解消や、エラー内容をググってみたりなど行いましたが、解消できず、お力をお借りできますと幸いです。
些細なことでもお心当たりがございましたらぜひご連絡ください。
試したこと
・guile@2の削除→warnigでインストールしろと出るので再度インストールしたらまた同じく競合を示すwarning
・configのエラーを解消できるといくつかの記事で書いてあった、.profileにpathを追加。ターミナル再起動後にも変化なし。
https://formulae.brew.sh/formula-linux/ffmpeg
を見ると、64-Bit Linux用のBottle (binary package) が用意されてるので、コンパイルしなくてもインストールできそうなんですが、なぜか(brewが)gcc使ってコンパイルしようとしてますね
コメントありがとうございます。
直接インストールしてみたのですが、dpkg --installでインストールは正常にできたものの、versionが不明な文字列になってしまい、今回このffmpegを使う理由としてeditlyというnodeライブラリが、そのバージョンに対応していないとででしまうので、色々試したのですがその方法での利用が難しいのかと考えていました。
dpkg(やapt)は関係ありません
Bottleは、dpkg(やapt)用のものではなく、brew用のものです
参考
https://blog.ottijp.com/2020/05/23/homebrew/
Bottleがあれば、普通はコンパイル不要でbrewでインストールできるはずなのですが、(brewが)gccでコンパイルしようとしてるので、なぜだろうと思いまして
もしかしたら、下記の制約でBottleが使われないのかも
> Your Homebrew's prefix is not /home/linuxbrew/.linuxbrew.
Some of Homebrew's bottles (binary packages) can only be used with the default
prefix (/home/linuxbrew/.linuxbrew).
Homebrewのパスを「/home/linuxbrew/.linuxbrew」に変えたら、Bottleが使われて、すんなりとインストールできるかも
(未確認)
回答1件
あなたの回答
tips
プレビュー