To install the Chromium browser, I type:
sudo apt install chromium-browser
But then I get several errors. What happens after is below:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
chromium-browser : Depends: libnss3 (>= 2:3.22) but 2:3.21-1ubuntu4 is to be installed
Depends: chromium-codecs-ffmpeg-extra (= 86.0.4240.75-0ubuntu0.16.04.1) but 76.0.3809.100-0ubuntu0.16.04.1 is to be installed or
chromium-codecs-ffmpeg (= 86.0.4240.75-0ubuntu0.16.04.1) but it is not going to be installed
Recommends: chromium-browser-l10n but it is not going to be installed
google-chrome-stable:amd64 : Depends: libasound2:amd64 (>= 1.0.16)
Depends: libatk-bridge2.0-0:amd64 (>= 2.5.3) but it is not going to be installed
Depends: libatk1.0-0:amd64 (>= 2.2.0) but it is not going to be installed
Depends: libatspi2.0-0:amd64 (>= 2.9.90) but it is not going to be installed
Depends: libcairo2:amd64 (>= 1.6.0) but it is not going to be installed
Depends: libcups2:amd64 (>= 1.4.0) but it is not going to be installed
Depends: libdrm2:amd64 (>= 2.4.38) but it is not going to be installed
Depends: libexpat1:amd64 (>= 2.0.1) but it is not going to be installed
Depends: libgbm1:amd64 (>= 8.1~0) but it is not going to be installed
Depends: libgdk-pixbuf2.0-0:amd64 (>= 2.22.0) but it is not going to be installed
Depends: libgtk-3-0:amd64 (>= 3.9.10) but it is not going to be installed
Depends: libnspr4:amd64 (>= 2:4.9-2~) but it is not going to be installed
Depends: libnss3:amd64 (>= 2:3.22) but it is not going to be installed
Depends: libpango-1.0-0:amd64 (>= 1.14.0) but it is not going to be installed
Depends: libpangocairo-1.0-0:amd64 (>= 1.14.0) but it is not going to be installed
Depends: libx11-6:amd64 (>= 2:1.4.99.1) but it is not going to be installed
Depends: libx11-xcb1:amd64 but it is not going to be installed
Depends: libxcb-dri3-0:amd64 but it is not going to be installed
Depends: libxcb1:amd64 (>= 1.9.2) but it is not going to be installed
Depends: libxcomposite1:amd64 (>= 1:0.3-1) but it is not going to be installed
Depends: libxdamage1:amd64 (>= 1:1.1) but it is not going to be installed
Depends: libxext6:amd64 but it is not going to be installed
Depends: libxfixes3:amd64 but it is not going to be installed
Depends: libxrandr2:amd64 but it is not going to be installed
Recommends: libu2f-udev:amd64 but it is not installable
Recommends: libvulkan1:amd64 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Please Help.
2 Answers 2
This isn't an answer from Chromium specifically, but a general answer for this type of problem.
This problem appears when sources or suites start to get mixed with apt. Let's say you try to install chromium-browser
. The Ubuntu bionic
suite ships version 86.0.4240.75-0ubuntu0.18.04.1
.
When you tried to install chromium-browser
, you got a line that looked like this:
Depends:
chromium-codecs-ffmpeg-extra (= 86.0.4240.75-0ubuntu0.16.04.1)
but 76.0.3809.100-0ubuntu0.16.04.1 is to be installed
or
chromium-codecs-ffmpeg (= 86.0.4240.75-0ubuntu0.16.04.1)
but it is not going to be installed
Bingo!
This means that your /etc/apt/sources.list
or /etc/apt/sources.list.d/*
contain sources that provide a different version of chromium.
When looking in official ubuntu repositories I found these versions:
- bionic: 86.0.4240.75-0ubuntu0.16.04.1
- xenial-updates: 86.0.4240.75-0ubuntu0.16.04.1
- xenial: 49.0.2623.108-0ubuntu1.1233
Since your version is between xenial and xenial-updates, it looks like you've found the package in an unofficial repository. This could be a problem caused by adding PPAs or sources from other distributions.
Here's my guess about what happened:
- You have an updated apt release file with all of the latest packages from official ubuntu archives, but you also have a PPA in there which isn't maintained and is out of sync with official archives.
- When you used
apt install chromium-browser
,apt
found the preferred version in thebionic
suite. - Apt tried to install the
chromium-codecs-ffmpeg-extra or chromium-codecs-ffmpeg
package. The highest priority hit it found was from this unmaintained PPA. Normally the highest-version found is selected, but in this case this PPA took priority. That might be because of pinning, or perhaps you have thexenial
source selected for that PPA andxenial
has priority overbionic
on your machine. - When
apt
found this version in your priority source, it failed because that version fails to meet the dependency requirements.
See Don't make a FrankenDebian for why adding incompatible sources is a bad idea.
The solution is to clean up your /etc/apt/sources.list
and /etc/apt/sources.list.d/*
.
- If you are using
bionic
remove all lines that are related to other releases (exceptbionic-security
andbionic-updates
). - If you are using PPAs, be sure that you actually need something from that PPA. Delete the PPA otherwise. If the PPA simply has newer versions of software: don't suffer from shiny new stuff syndrome. PPAs aren't trusted sources and can contain anything. Also they can become unmaintained at any time. Take the latest version in your official release.
run command to add the PPA:
sudo add-apt-repository ppa:xalt7x/chromium-deb-vaapi
Run command to "pin" the PPA to avoid installation of snap package in Ubuntu 20.04:
cat <<EOF | sudo tee /etc/apt/preferences.d/pin-xalt7x-chromium-deb-vaapi
Package: *
Pin: release o=LP-PPA-xalt7x-chromium-deb-vaapi
Pin-Priority: 1337
EOF
After that you can install the browser via:
sudo apt update
sudo apt install chromium-browser chromium-codecs-ffmpeg-extra
P.S - To remove from source list
sudo add-apt-repository --remove ppa:xalt7x/chromium-deb-vaapi
-
Why recommend a PPA? Isn't chromium available from official repositories?Stewart– Stewart2020年10月28日 12:57:43 +00:00Commented Oct 28, 2020 at 12:57
You must log in to answer this question.
Explore related questions
See similar questions with these tags.
cat /etc/apt/sources.list /etc/apt/sources.list.d/*
to your question?