0

I got the following error message:

$ sudo apt -f remove libgranite-common 
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:
 libgranite5 : Depends: libgranite-common (>= 5.3.0-1) but it is not going to be installed
 libgranite6 : Depends: libgranite-common (>= 6.0.0+r2017+pkg118~daily~ubuntu6.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libgranite-common
The following packages will be upgraded:
  libgranite-common
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
27 not fully installed or removed.
Need to get 0 B/53.0 kB of archives.
After this operation, 9,216 B disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 364127 files and directories currently installed.)
Preparing to unpack .../libgranite-common_6.0.0+r2017+pkg118~daily~ubuntu6.1_all.deb ...
Unpacking libgranite-common (6.0.0+r2017+pkg118~daily~ubuntu6.1) over (5.3.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/libgranite-common_6.0.0+r2017+pkg118~daily~ubuntu6.1_all.deb (--unpack):
 trying to overwrite '/usr/share/metainfo/granite.appdata.xml', which is also in package libgranite5:amd64 5.3.0-1
Errors were encountered while processing:
 /var/cache/apt/archives/libgranite-common_6.0.0+r2017+pkg118~daily~ubuntu6.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

tribbloid
  • 111
  • Whoa, hang on. A "broken" package is NOT corrupt. It's "broken" in the sense that it "breaks" a clean solution. Your output clearly shows that you are trying to install packages that conflict with each other...which has no clean solution ("breaks"). The output even shows you exactly why those packages conflict. – user535733 May 09 '21 at 23:26

1 Answers1

2

libgranite5 and libgranite6 depend on the libgranite-common package which uses the same file as another package. First, try to apt -f remove libgranite{5,6}.

Then, you may need to only install one version of the library in the future.

0xLogN
  • 73
  • 11