简体   繁体   English

如何在 Arch linux 上安装 gstreamer(gst lib)

[英]How do I install gstreamer(gst lib) on Arch linux

I get this error:我收到此错误:

    [k4li@madison gst]$ gcc basic-tutorial-1.c 
basic-tutorial-1.c:1:21: fatal error: gst/gst.h: No such file or directory
 #include <gst/gst.h>

but I installed gstreamer and all the plugins on my Arch machine.但是我在我的 Arch 机器上安装了 gstreamer 和所有插件。

sudo pacman -S --needed $(pacman -Ssq gstreamer)

What did I miss?我错过了什么?

You don't even have CFLAGS and LDFLAGS for compiling and linking to the streamer libraries.你甚至没有 CFLAGS 和 LDFLAGS 来编译和链接到流媒体库。 It should be something like this:它应该是这样的:

gcc `pkg-config --cflags --libs gstreamer-1.0` basic-tutorial-1.c

Your example file sounds like it was from http://gstreamer.com .您的示例文件听起来像是来自http://gstreamer.com This is from the old "0.10" branch of gstreamer and is several years unmaintained.这是来自 gstreamer 的旧“0.10”分支,并且几年没有维护。 Current version is "1.8.2".当前版本是“1.8.2”。 This site is currently not the best resource for gstreamer development.该站点目前不是 gstreamer 开发的最佳资源。

You may be lucky by exchanging gstreamer-1.0 with gstreamer-0.10 at the above command when your system still supports these libraries.当您的系统仍然支持这些库时,您可能很幸运,通过在上述命令中将 gstreamer-1.0 与 gstreamer-0.10 交换。

install gstreamer:安装 gstreamer:

sudo pacman -S gstreamer

make it useful,you need install the plugins packeages you require:让它有用,你需要安装你需要的插件包:

  • gst-libav gst-libav
  • gst-plugins-bad gst 插件坏
  • gst-plugins-base gst 插件库
  • gst-plugins-good gst-插件-好
  • gst-plugins-ugly gst-plugins-丑陋

etc

for more information,read the wiki for gstreamer in archwiki.有关更多信息,请阅读 archwiki 中gstreamer的 wiki。

为了避免致命错误,您需要在 Arch linux 中安装包pkgconf

sudo pacman -S pkgconf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM