Install VLC Media Player in Ubuntu distribution

VLC Media Player has been developed by VideoLAN. The package was first released on February 01, 2001. Furthermore, at the time of writing the article latest stable version available for VLC Media Player is 3.0.8. With the help of application, we can play various multimedia files/formats including streaming protocols. The Media Player currently supports 48 languages. In this article, we would discuss how to install VLC Media Player in Ubuntu.

We can connect VLC to a Chromecast device ever since VLC v3 (Vetinari) was released. We will discuss that in a separate article.

Moreover, there are two options available when it comes to installing VLC Media Player in Ubuntu –

  1. Installation done through apt command-line utility, or
  2. Build it from source.

Note: Following operations would require you to have superuser privileges. In case you don’t have then contact your System Administrator for assistance.

Install VLC Media Player through apt in Ubuntu

Installing VLC Media Player is fairly straight-forward through apt (Advanced Packaging Tool) command-line utility. As, VLC Media Player is already available in standard Ubuntu repositories. Therefore, first we will update the repository to get the latest version of package available. Hence, issue the following in terminal –

sudo apt update

Next, install the application through –

sudo apt install vlc

The above command installs VLC Media Player and related dependencies.

Build VLC Media Player from Source Code

Alternately, we can also install VLC Media Player from the source code itself. We would first have to download the package from the official website of VideoLAN.

Visit the Download section on VLC Media Player official website (VideoLan) and under Tarballs section, download – VLC source code tar.xz

And, extract the .tar.xz package –

tar -xvf vlc-3.0.8.tar.xz

All the compressed files will be extracted in directory – vlc-3.0.8

Thereafter, install few related dependencies –

sudo apt-get install git build-essential 
sudo apt-get install pkg-config libtool automake 
sudo apt-get install autopoint gettext

sudo apt-get install libxcb-shm0-dev libxcb-xv0-dev 
sudo apt-get install libxcb-keysyms1-dev libxcb-randr0-dev 
sudo apt-get install libxcb-composite0-dev

sudo apt-get --no-install-recommends build-dep vlc

Next, we will configure VLC –

cd /path/to/folder/vlc-3.0.8/

./configure

Once VLC is configured, issue the following in terminal –

make

To install VLC Media Player –

sudo make install

Or, you can also run the application directly through –

./vlc

In conclusion, we have discussed how to install VLC Media Player in Ubuntu.

Additional Info –

As discussed above, if for some reason you choose to skip the following step –

sudo apt-get --no-install-recommends build-dep vlc

Then, you will asked to install the required library files. Hence, you will encounter following errors/warnings while configuring VLC Media Player –

Error 1:

configure: error: Could not find lua. Lua is needed for some interfaces (rc, telnet, http) as well as many other custom scripts.

Use –disable-lua to ignore this error.

Solution 1:

sudo apt install lua5.2 liblua5.2-dev

Error 2:

configure: WARNING: Library libmpg123 needed for mpg123 was not found

Solution 2:

sudo apt install libmpg123-dev

Error 3:

configure: WARNING: No package ‘gstreamer-app-1.0’ found. GStreamer modules will not be built.

Solution 3:

sudo apt install libgstreamer-plugins-base1.0-dev

Error 4:

configure: error: Missing libav or FFmpeg. Pass –disable-avcodec to ignore this error.

Solution 4:

sudo apt install libavcodec-dev

Error 5:

configure: error: No package ‘libavformat’ found. Pass –disable-avformat to ignore this error.

Solution 5:

sudo apt install libavformat-dev

Error 6:

configure: error: No package ‘libswscale’ found. Pass –disable-swscale to ignore this error.

Proper software scaling and some video chroma conversion will be missing.

Solution 6:

sudo apt install libswscale-dev

Error 7:

configure: error: Could not find liba52 on your system: you may get it from weblink.

Alternatively you can use –disable-a52 to disable the a52 plugin.

Solution 7:

sudo apt install liba52-0.7.4-dev

Error 8:

configure: error: Package requirements (xcb-shm) were not met: No package ‘xcb-shm’ found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables XCB_SHM_CFLAGS and XCB_SHM_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

Solution 8:

sudo apt install libxcb-shm0-dev

Error 9:

configure: error: Package requirements (xcb-composite) were not met: No package ‘xcb-composite’ found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables XCB_COMPOSITE_CFLAGS and XCB_COMPOSITE_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details

Solution 9:

sudo apt install libxcb-composite0-dev

Error 10:

configure: error: Package requirements (xcb-xv >= 1.1.90.1) were not met: No package ‘xcb-xv’ found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables XCB_XV_CFLAGS and XCB_XV_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

Solution 10:

sudo apt install libxcb-xv0-dev

Error 11:

configure: error: No package ‘alsa’ found. alsa-lib 1.0.24 or later required. Pass –disable-alsa to ignore this error.

Solution 11:

sudo apt install libasound2-dev

Error 12:

vlc: error while loading shared libraries: libvlc.so.5: cannot open shared object file: No such file or directory

Solution 12:

sudo apt install libvlc5

Error 13:

xcb_window window error: X11 key press support not compiled-in

Solution 13:

sudo apt install libxml2-dev

Error 14:

configure: WARNING: Library libarchive >= 3.1.0 needed for archive was not found

Solution 14:

sudo apt install libarchive-dev

Error 15:

configure: WARNING: No package ‘live555’ found.

Solution 15:

sudo apt install liblivemedia-dev

Error 16:

configure: WARNING: Library libebml >= 1.3.6 libmatroska needed for matroska was not found

Solution 16:

sudo apt install libebml-dev libmatroska-dev

Error 17:

configure: WARNING: No package ‘libva’ found.

Solution 17:

sudo apt install libva-dev

Error 18:

configure: WARNING: Library libchromaprint >= 0.6.0 needed for chromaprint was not found

Solution 18:

sudo apt install libchromaprint-dev

Error 19:

configure: WARNING: Library protobuf-lite >= 2.5.0 needed for chromecast was not found

Solution 19:

sudo apt install libprotobuf-lite17

Error 20:

configure: WARNING: No package ‘Qt5Core’ found

No package ‘Qt5Widgets’ found No package ‘Qt5Gui’ found

No package ‘Qt5Svg’ found. configure: WARNING: The skins2 module depends on the Qt interface, Qt is not built so skins2 is disabled.

Solution 20:

sudo apt install qtbase5-dev

Error 21:

libEGL warning: DRI2: failed to authenticate

Solution 21:

sudo apt install --reinstall libqt5svg5

Error 22:

[0000558aa4a7cbf0] main xml reader error: XML reader not found

[0000558aa4a6c620] main interface error: no suitable interface module

[0000558aa49f5580] main libvlc error: interface “globalhotkeys,none” initialization failed

Solution 22:

sudo apt install  qt4-default

Lastly, we could only install command-line utility of vlc even if we resolve all the above mentioned errors/warnings. And, it could only be launched by running command vlc in terminal. Therefore, it is advisable not to skip the following step –

sudo apt-get --no-install-recommends build-dep vlc