Update theme submodule
[platform/upstream/gstreamer.git] / markdown / installing / on-linux.md
1 # Installing on Linux
2
3 ## Prerequisites
4
5 GStreamer is included in all Linux distributions. We recommend using the latest version of a fast moving distribution such as Fedora, Ubuntu (non-LTS), Debian sid or OpenSuse to get a recent GStreamer release.
6
7 All the commands given in this section are intended to be typed in from
8 a terminal.
9
10 > ![Warning](images/icons/emoticons/warning.png)
11 Make sure you have superuser (root) access rights to install the GStreamer SDK.
12
13 ## Install GStreamer on Fedora
14
15 Run the following command:
16
17 ```
18 dnf install gstreamer1-devel gstreamer1-plugins-base-tools gstreamer1-devel-docs gstreamer1-plugins-base-devel gstreamer1-plugins-base-devel-docs gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-ugly-devel-docs  gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras
19 ```
20
21 ## Install GStreamre on Ubuntu or Debian
22
23 Run the following command:
24
25 ` apt-get install .... `
26
27 ## Building applications using GStreamer
28
29 The only other “development environment” that is required is
30 the `gcc` compiler and a text editor. In order to compile code that
31 requires the GStreamer SDK and uses the GStreamer core library, remember
32 to add this string to your `gcc` command:
33
34 ```
35 pkg-config --cflags --libs gstreamer-1.0
36 ```
37
38 If you're using other GStreamer libraries, e.g. the video library, you
39 have to add additional packages after gstreamer-1.0 in the above string
40 (gstreamer-video-1.0 for the video library, for example).
41
42 If your application is built with the help of libtool, e.g. when using
43 automake/autoconf as a build system, you have to run
44 the `configure` script from inside the `gst-sdk-shell` environment.
45
46 #### Getting the tutorial's source code
47
48 The source code for the tutorials can be copied and pasted from the
49 tutorial pages into a text file, but, for convenience, it is also available
50 in a GIT repository in the `examples/tutorials` subdirectory.
51
52 The GIT repository can be cloned with:
53
54 ```
55 git clone git://anongit.freedesktop.org/gstreamer/gst-docs
56 ```
57
58 #### Building the tutorials
59
60 ```
61 gcc basic-tutorial-1.c -o basic-tutorial-1 `pkg-config --cflags --libs gstreamer-1.0`
62 ```
63
64 Using the file name of the tutorial you are interested in
65 (`basic-tutorial-1` in this example).
66
67 > ![Warning](images/icons/emoticons/warning.png) Depending on the GStreamer libraries you need to use, you will have to add more packages to the `pkg-config` command, besides `gstreamer-1.0`
68 > At the bottom of each tutorial's source code you will find the command for that specific tutorial, including the required libraries, in the required order.
69 > When developing your own applications, the GStreamer documentation will tell you what library a function belongs to.
70
71 #### Running the tutorials
72
73 To run the tutorials, simply execute the desired tutorial:
74
75 ``` c
76 ./basic-tutorial-1
77 ```