Ubuntu – How to install Telegram app in 18.04

18.04aptpackage-managementxubuntu

When I try to install Telegram, I get the following error:

itsmarttricks@mangesh:~$ sudo apt-get install telegram
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libreoffice-core : Depends: libreoffice-common (> 1:6.2.2) but it is not going to be installed
 libreoffice-java-common : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.18.04.1~lo1) but it is not going to be installed
 libreoffice-report-builder : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.18.04.1~lo1) but it is not going to be installed
 libreoffice-script-provider-bsh : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.18.04.1~lo1) but it is not going to be installed
 libreoffice-script-provider-js : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.18.04.1~lo1) but it is not going to be installed
 libreoffice-script-provider-python : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.18.04.1~lo1) but it is not going to be installed
 libreoffice-style-colibre : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.18.04.1~lo1) but it is not going to be installed
 libreoffice-style-elementary : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.18.04.1~lo1) but it is not going to be installed
 libreoffice-style-tango : Depends: libreoffice-common (= 1:6.2.2-0ubuntu0.18.04.1~lo1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Best Answer

It looks like you've got LibreOffice installed, but somehow managed to break its installation. To fix it, try:

sudo apt-mark auto libreoffice-common

If you've got an old version of apt-get (before 11.something, I think – well before Ubuntu 18.04's version) and this doesn't work, try instead:

sudo apt-get markauto libreoffice-common

and then update your package manager immediately.

After running one of these commands, run:

sudo apt install

(I think.)

Related Question