VLC will not install [duplicate]

Trying to install VLC 16.04

sudo apt update sudo apt install vlc

This is what I am getting

The following packages have unmet dependencies:

 vlc : Depends: vlc-nox (= 2.2.2-5) but 2.2.4-6~ubuntu16.04.1~ppa1 is to be installed
       Recommends: vlc-plugin-notify (= 2.2.2-5) but it is not going to be installed
       Recommends: vlc-plugin-samba (= 2.2.2-5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Thanks for any help...


Solution 1:

These are the resolutions for failed installs of default packages from the repository.

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install -f
$ sudo apt install vlc

The commands above works because the depends are actually in the repository and needs to be sure to have the latest updates and upgrades of the packages.

Solution 2:

Try:

sudo apt-get update

to update your package list. Then:

sudo apt-get autoclean

to clean up any partial packages. Then:

sudo apt-get clean

to clean up the apt cache.

sudo apt-get autoremove

will clean up any unneeded dependencies. If while doing this you can identify the broken package this code will very forcefully remove it.

sudo dpkg --remove -force --force-remove-reinstreq package name

Change package name to the real name of course.

This will fix your broken repositories and then :

sudo apt install vlc

will install vlc for you.