0

I'm a brand new linux/ubuntu user. I've been able to fix some basic things, but this I'm having trouble with.

OS/Version is:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:    22.04
Codename:   jammy

I keep getting that the The following packages have unmet dependencies: with the apt--fix-broken install as a recommended fix. However, this only results in the following:

matt@matt-MS-7C02:~$ sudo apt-get autoremove
[sudo] password for matt: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libgl1-mesa-dri : Depends: libglapi-mesa (= 22.0.1-1ubuntu2.1) but 22.1.3+git2206301758.a066287f1b5~j~mesarc0 is installed
                   Breaks: libgl1-mesa-dri:i386 (!= 22.0.1-1ubuntu2.1) but 22.1.3+git2206301758.a066287f1b5~j~mesarc0 is installed
 libgl1-mesa-dri:i386 : Breaks: libgl1-mesa-dri (!= 22.1.3+git2206301758.a066287f1b5~j~mesarc0) but 22.0.1-1ubuntu2.1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
matt@matt-MS-7C02:~$ sudo apt--fix-broken install
sudo: apt--fix-broken: command not found
matt@matt-MS-7C02:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libgl1-mesa-dri
The following packages will be upgraded:
  libgl1-mesa-dri
1 upgraded, 0 newly installed, 0 to remove and 53 not upgraded.
2 not fully installed or removed.
Need to get 0 B/7,878 kB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 215762 files and directories currently installed.)
Preparing to unpack .../libgl1-mesa-dri_22.1.3+git2206301758.a066287f1b5~j~mesar
c0_amd64.deb ...
Unpacking libgl1-mesa-dri:amd64 (22.1.3+git2206301758.a066287f1b5~j~mesarc0) ove
r (22.0.1-1ubuntu2.1) ...
dpkg: error processing archive /var/cache/apt/archives/libgl1-mesa-dri_22.1.3+gi
t2206301758.a066287f1b5~j~mesarc0_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/dri/i915_dri.so', which is also 
in package libgl1-amber-dri:amd64 21.3.7-0ubuntu1
Errors were encountered while processing:
 /var/cache/apt/archives/libgl1-mesa-dri_22.1.3+git2206301758.a066287f1b5~j~mesa
rc0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

What could I do to fix this broken dependencies?

  • You've not provided any OS & particularly release details; but I see 3rd party packages that are the issue. Assuming you're using jammy the expected package for one picked at random is libglapi-mesa | 22.0.1-1ubuntu2.1 | jammy-updates | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x (with newer package in -proposed) but you have conflicts with 3rd party source added to your unstated OS/release as the package you have isn't a Ubuntu repository package. For us to help, we need release details & what source you've added that are getting packages from; it may not be suitable. – guiverc Jul 09 '22 at 02:54
  • Here are my os/release details

    Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy

    – ThoughtfulApe Jul 09 '22 at 03:02
  • Similar issue was discussed here: https://askubuntu.com/questions/148383/how-to-resolve-dpkg-error-processing-var-cache-apt-archives-python-apport-2-0 – Mike D Jul 09 '22 at 04:55
  • @MikeD politely disagree. This output shows a classic overwrite error, that output shows an internal apt error ("Bad marshalling value"). Seems not similar at all to me. – user535733 Jul 09 '22 at 06:19
  • Does this answer your question? dpkg error: "trying to overwrite file, which is also in...". You will need to read your output line-by-line, peeling back the apt errors that are merely repeats or summaries of lower-level dpkg problems. At the center of the onion, you find trying to overwrite '/usr/lib/x86_64-linux-gnu/dri/i915_dri.so', which is also in package libgl1-amber-dri:amd64 21.3.7-0ubuntu1. The package names are different in the duplicate question, but the problem and solution are similar. – user535733 Jul 09 '22 at 06:19

0 Answers0