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 –
- Installation done through apt command-line utility, or
- 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 pkg-config libtool automake autopoint gettext sudo apt-get install libxcb-shm0-dev libxcb-xv0-dev libxcb-keysyms1-dev libxcb-randr0-dev 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 –
To install VLC Media Player –
sudo make install
Or, you can also run the application directly through –
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 –
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.
sudo apt install lua5.2 liblua5.2-dev
configure: WARNING: Library libmpg123 needed for mpg123 was not found
sudo apt install libmpg123-dev
configure: WARNING: No package 'gstreamer-app-1.0' found. GStreamer modules will not be built.
sudo apt install libgstreamer-plugins-base1.0-dev
configure: error: Missing libav or FFmpeg. Pass --disable-avcodec to ignore this error.
sudo apt install libavcodec-dev
configure: error: No package 'libavformat' found. Pass --disable-avformat to ignore this error.
sudo apt install libavformat-dev
configure: error: No package 'libswscale' found. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.
sudo apt install libswscale-dev
configure: error: Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.
sudo apt install liba52-0.7.4-dev
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.
sudo apt install libxcb-shm0-dev
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
sudo apt install libxcb-composite0-dev
configure: error: Package requirements (xcb-xv >= 184.108.40.206) 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.
sudo apt install libxcb-xv0-dev
configure: error: No package 'alsa' found. alsa-lib 1.0.24 or later required. Pass --disable-alsa to ignore this error.
sudo apt install libasound2-dev
vlc: error while loading shared libraries: libvlc.so.5: cannot open shared object file: No such file or directory
sudo apt install libvlc5
xcb_window window error: X11 key press support not compiled-in
sudo apt install libxml2-dev
configure: WARNING: Library libarchive >= 3.1.0 needed for archive was not found
sudo apt install libarchive-dev
configure: WARNING: No package 'live555' found.
sudo apt install liblivemedia-dev
configure: WARNING: Library libebml >= 1.3.6 libmatroska needed for matroska was not found
sudo apt install libebml-dev libmatroska-dev
configure: WARNING: No package 'libva' found.
sudo apt install libva-dev
configure: WARNING: Library libchromaprint >= 0.6.0 needed for chromaprint was not found
sudo apt install libchromaprint-dev
configure: WARNING: Library protobuf-lite >= 2.5.0 needed for chromecast was not found
sudo apt install libprotobuf-lite17
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.
sudo apt install qtbase5-dev
libEGL warning: DRI2: failed to authenticate
sudo apt install --reinstall libqt5svg5
[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
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