2

I'm new to Linux and I had to install Maya AutoDesk for a homework, I tried like for two hours, but I couldn't make it work. I decided to install it later, but I think I've messed something up. I tried to install neofetch a few days later with this command.


foo@bar:~$ sudo apt install neofetch

But it came with a problem

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:
 libpng12-dev : Depends: libpng12-0 (= 1.2.54-1ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

So I tried to use,

sudo apt --fix-broken install

But this appear

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:
  libappindicator1 libc++1 libc++1-9 libc++abi1-9 libdbusmenu-gtk4
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 12 not upgraded.
1 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 ... 302707 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb (--unpack):
 unable to install new version of '/lib/x86_64-linux-gnu/libpng12.so.0': No such file or directory
No apport report written because the error message indicates an issue on the local system
                                                                                         Errors were encountered while processing:
 /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I don't know what to do, I would really appreciate any help. It's also my first post so any feedback it's welcome.

I also tried to do

foo@bar:~$ sudo apt install --reinstall libpng12-0

But this apeared,

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libappindicator1 libc++1 libc++1-9 libc++abi1-9 libdbusmenu-gtk4
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  libpng12-0
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
1 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.
(Reading database ... 302707 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu
1_amd64.deb (--unpack):
 unable to install new version of '/lib/x86_64-linux-gnu/libpng12.so.0': No such
 file or directory
No apport report written because the error message indicates an issue on the loc
al system
         Errors were encountered while processing:
 /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
benjaSantana
  • 23
  • 1
  • 5
  • Does this answer your question? [Ubuntu 19.04 problems install upgrades](https://askubuntu.com/questions/1164480/ubuntu-19-04-problems-install-upgrades) – Raffa Mar 27 '20 at 18:11
  • Looks like you removed files by using `rm`. Unfortunately, those files were installed by the package manager. Never, ever do that. Try `sudo apt install --reinstall libpng12-0` to repair the damage. – user535733 Mar 27 '20 at 18:18
  • Thank you both for answering, @user535733 I tried to do that but it didn't work, let me update the question. – benjaSantana Mar 27 '20 at 19:59
  • Oh, dear. Rather than have us guess, why don't you explain in detail exactly what you used `rm` upon. Did you `rm` all of `x86_64-linux-gnu`? Or all of `/lib`? – user535733 Mar 27 '20 at 23:06
  • I had to do a Refresh Install from Recovery mode. It was fixed that way, I won't ever use ```rm``` with the package manager @user535733 Thank you! – benjaSantana Mar 28 '20 at 15:27

0 Answers0