0

I have tried this solution however it seems like dpkg is unable to remove that dependency either. Here is my terminal output when I try to fix broken dependency:

ayon@schneizel:/usr/share/applications$ sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libfwupdplugin1
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  libgranite5
The following NEW packages will be installed:
  libgranite5
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/167 kB of archives.
After this operation, 650 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 122024 files and directories currently installed.)
Preparing to unpack .../libgranite5_5.3.0-1_amd64.deb ...
Unpacking libgranite5:amd64 (5.3.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/libgranite5_5.3.0-1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/metainfo/granite.appdata.xml', which is also in package libgranite-common 6.2
.0+r2223+pkg122~ubuntu6.1
Errors were encountered while processing:
 /var/cache/apt/archives/libgranite5_5.3.0-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Here is my terminal output when I attempt to remove that package (or whatever):

ayon@schneizel:/usr/share/applications$ sudo dpkg -P libgranite-common
dpkg: dependency problems prevent removal of libgranite-common:
 libgranite6:amd64 depends on libgranite-common (>= 6.2.0+r2223+pkg122~ubuntu6.1).

dpkg: error processing package libgranite-common (--purge): dependency problems - not removing Errors were encountered while processing: libgranite-common

ayon
  • 11

1 Answers1

2

You were trying to install libgranite5_5.3.0 package, while it has conflict to the libgranite-common 6.2.0 which was already installed in your system.

dpkg -P command won't work because some other packages require it. Here it's libgranite6 and even some software packages depends on libgranite6.

As a workaround, you may use the apt command to remove it as well as dependencies:

sudo apt remove --autoremove libgranite-common

Keep an eye on terminal output, it will tell you which packages to remove before typing 'y' and hitting enter.

Or, if apt command refuse to work, use:

sudo dpkg -P libgranite6

It will remove the package, or refuse because some other packages depend on it. You have to remove all dependent packages until being able to install libgranite5_5.3.0.

And, if possible I would recommend to use Synaptic Package Manager which can be more friendly to beginners.