0

Update:

sudo apt-get -f install

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.15.0-38 linux-headers-4.15.0-38-generic
  linux-headers-4.15.0-42 linux-headers-4.15.0-42-generic
  linux-headers-4.15.0-43 linux-headers-4.15.0-43-generic
  linux-headers-4.15.0-45 linux-headers-4.15.0-45-generic
  linux-headers-4.15.0-46 linux-headers-4.15.0-46-generic
  linux-headers-4.15.0-47 linux-headers-4.15.0-47-generic
  linux-headers-4.15.0-50 linux-headers-4.15.0-50-generic
  linux-image-4.15.0-38-generic linux-image-4.15.0-42-generic
  linux-image-4.15.0-43-generic linux-image-4.15.0-45-generic
  linux-image-4.15.0-46-generic linux-image-4.15.0-47-generic
  linux-image-4.15.0-50-generic linux-modules-4.15.0-38-generic
  linux-modules-4.15.0-42-generic linux-modules-4.15.0-43-generic
  linux-modules-4.15.0-45-generic linux-modules-4.15.0-46-generic
  linux-modules-4.15.0-47-generic linux-modules-4.15.0-50-generic
  linux-modules-extra-4.15.0-38-generic linux-modules-extra-4.15.0-42-generic
  linux-modules-extra-4.15.0-43-generic linux-modules-extra-4.15.0-45-generic
  linux-modules-extra-4.15.0-46-generic linux-modules-extra-4.15.0-47-generic
  linux-modules-extra-4.15.0-50-generic qtdeclarative5-controls-plugin
  qtdeclarative5-dialogs-plugin
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libpng12-0
The following NEW packages will be installed:
  libpng12-0
0 upgraded, 1 newly installed, 0 to remove and 116 not upgraded.
14 not fully installed or removed.
Need to get 0 B/116 kB of archives.
After this operation, 285 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 623068 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1.1) ...
dpkg: error processing archive /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libpng12-0/changelog.Debian.gz', which is different from other instances of package libpng12-0:amd64
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo rm /usr/share/doc/libpng12-0/changelog.Debian.gz
sudo apt-get -f install

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.15.0-38 linux-headers-4.15.0-38-generic
  linux-headers-4.15.0-42 linux-headers-4.15.0-42-generic
  linux-headers-4.15.0-43 linux-headers-4.15.0-43-generic
  linux-headers-4.15.0-45 linux-headers-4.15.0-45-generic
  linux-headers-4.15.0-46 linux-headers-4.15.0-46-generic
  linux-headers-4.15.0-47 linux-headers-4.15.0-47-generic
  linux-headers-4.15.0-50 linux-headers-4.15.0-50-generic
  linux-image-4.15.0-38-generic linux-image-4.15.0-42-generic
  linux-image-4.15.0-43-generic linux-image-4.15.0-45-generic
  linux-image-4.15.0-46-generic linux-image-4.15.0-47-generic
  linux-image-4.15.0-50-generic linux-modules-4.15.0-38-generic
  linux-modules-4.15.0-42-generic linux-modules-4.15.0-43-generic
  linux-modules-4.15.0-45-generic linux-modules-4.15.0-46-generic
  linux-modules-4.15.0-47-generic linux-modules-4.15.0-50-generic
  linux-modules-extra-4.15.0-38-generic linux-modules-extra-4.15.0-42-generic
  linux-modules-extra-4.15.0-43-generic linux-modules-extra-4.15.0-45-generic
  linux-modules-extra-4.15.0-46-generic linux-modules-extra-4.15.0-47-generic
  linux-modules-extra-4.15.0-50-generic qtdeclarative5-controls-plugin
  qtdeclarative5-dialogs-plugin
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libpng12-0
The following NEW packages will be installed:
  libpng12-0
0 upgraded, 1 newly installed, 0 to remove and 116 not upgraded.
14 not fully installed or removed.
Need to get 0 B/116 kB of archives.
After this operation, 285 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 623068 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libpng12-0:i386 (1.2.54-1ubuntu1.1) ...
Setting up libpng12-0:amd64 (1.2.54-1ubuntu1.1) ...
Setting up libreoffice-core (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up libreoffice-pdfimport (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up libreoffice-avmedia-backend-gstreamer (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up libreoffice-base-core (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up libreoffice-calc (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up libreoffice-draw (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up libreoffice-gtk (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up libreoffice-gnome (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up libreoffice-impress (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up libreoffice-math (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up libreoffice-writer (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up python3-uno (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Setting up libreoffice-ogltrans (1:5.1.6~rc2-0ubuntu1~xenial7) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
terdon
  • 100,812
Elia
  • 103
  • @fkraiem noted about the --force-depends, still learning how to behave around linux. Also updated the full output. I am fully ready to follow what you think can work. – Elia Jul 06 '19 at 13:44
  • 1
    With the things you have done, your system is now probably in a different state than before, so delete everything and post the output of sudo apt-get -f install (and use code formatting with the {} button). – fkraiem Jul 06 '19 at 13:48
  • @fkraiem updated as requested – Elia Jul 06 '19 at 13:53
  • 1
    There's a conflict about the file /usr/share/doc/libpng12-0/changelog.Debian.gz, maybe it was not properly removed. You can just manually delete it (sudo rm /usr/share/doc/libpng12-0/changelog.Debian.gz) and try sudo apt-get -f install again. – fkraiem Jul 06 '19 at 13:58
  • Seems like things went back to normal now? the red package manager error has disappeared. Running sudo dpkg --configure -a outputs nothing – Elia Jul 06 '19 at 14:02
  • 1
    Yes, it seems to be fine. You should really upgrade those 116 packages, though... – fkraiem Jul 06 '19 at 14:06
  • how would I go about doing that? just to make sure I don't mess anything again. Is it as simple as sudo apt-get update ? – Elia Jul 06 '19 at 14:08
  • 1
    To upgrade packages it's sudo apt upgrade (you should now mostly use apt instead of apt-get). – fkraiem Jul 06 '19 at 14:10
  • I sincerely appreciate all the help and guidance. Thank you @fkraiem. – Elia Jul 06 '19 at 14:17
  • Did you solve your problem? If not, do the answers here help? https://askubuntu.com/questions/176121/dpkg-error-trying-to-overwrite-file-which-is-also-in – Seth Jul 06 '19 at 18:26

0 Answers0