how to install .tar.xz file in ubuntu

This is not good practice unless you know the implications of installing software this way, and trust the source of the file.

Decompress:

tar xf [filename]

This will expand the contents of the file to a folder. Then the commands are, from the folder:

./configure
make
sudo make install

This will compile the VLC source code, and then install it into your system. Because you are installing as root, this is why you must know that the source of the file is trustworthy.

To compile vlc, you need at least the following libraries installed:

  • libdvbpsi (compulsory) ,
  • mpeg2dec (compulsory) ,
  • libdvdcss if you want to be able to read encrypted DVDs ,
  • libdvdplay if you want to have DVD menu navigation ,
  • a52dec if you want to be able to decode the AC3 (i.e. A52) sound format often used in DVDs ,
  • ffmpeg, libmad, faad2 if you want to read MPEG 4 / DivX files ,
  • libogg & libvorbis if you want to read Ogg Vorbis files .

You will probably also need to install the build-essential package to get a compiler and associated commands.

More details here


First, you should have xz installed on your system. If not:

# apt-get install xz-utils

Then, instead of "z" option in tar command (which is for zip), you must use "J" (which is for xz):

$ tar xvfJ fich.tar.xz