Score:1

Unmet dependencies issue in ubuntu 20.04

za flag

If i am trying to install any package in ubuntu ,for eg-dart then I am getting the error as,

sudo apt-get install dart
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:
 libwxgtk2.8-0 : Depends: libpng12-0 (>= 1.2.13-4) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

And if i try to install fix-broken then,

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:
  libpng12-0
The following NEW packages will be installed:
  libpng12-0
0 upgraded, 1 newly installed, 0 to remove and 78 not upgraded.
3 not fully installed or removed.
Need to get 0 B/117 kB of archives.
After this operation, 312 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 219006 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.50-1ubuntu2_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.50-1ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/libpng12-0_1.2.50-1ubuntu
2_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.50-1ubuntu2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I had even tried to install the missing dependencies too but it isnt working

sudo apt update
Hit:1 http://oem.archive.canonical.com focal InRelease
Hit:2 http://dell.archive.canonical.com focal InRelease                                                                                                                                                           
Ign:3 https://storage.googleapis.com/download.dartlang.org/linux/debian stable InRelease                                                                                                                          
Hit:4 https://download.docker.com/linux/ubuntu focal InRelease                                                                                                                                                    
Hit:5 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                                                      
Hit:6 http://archive.canonical.com/ubuntu focal InRelease                                                                                                                                                         
Hit:7 https://repo.pritunl.com/stable/apt focal InRelease                                                                                                                                                         
Hit:8 http://archive.ubuntu.com/ubuntu focal InRelease                                                                                                                                                            
Hit:9 https://storage.googleapis.com/download.dartlang.org/linux/debian stable Release                                                                                                                            
Ign:10 http://binaries.erlang-solutions.com/debian focal InRelease                                                                                                                            
Hit:11 http://archive.ubuntu.com/ubuntu focal-updates InRelease                                                                                                         
Hit:12 http://ppa.launchpad.net/somerville-dla-team/ppa/ubuntu bionic InRelease                                                                                                  
Hit:13 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                                                                
Hit:14 http://binaries.erlang-solutions.com/debian focal Release                                                                                       
Hit:15 http://archive.ubuntu.com/ubuntu focal-backports InRelease                                                                
Hit:16 http://deb.anydesk.com all InRelease                                                                
Hit:17 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease
Ign:19 http://archive.ubuntu.com/ubuntu trusty InRelease
Hit:20 http://archive.ubuntu.com/ubuntu trusty Release
Reading package lists... Done
Building dependency tree       
Reading state information... Done
78 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386'

sudo apt upgrade
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:
 libwxgtk2.8-0 : Depends: libpng12-0 (>= 1.2.13-4) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

cat /etc/apt/sources.list

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://archive.ubuntu.com/ubuntu/ focal universe
deb http://archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse


deb http://archive.ubuntu.com/ubuntu/ focal-backports restricted multiverse universe main
guiverc avatar
cn flag
Why are you using such an outdated package? `libpng12-0 | 1.2.50-1ubuntu2 | trusty | amd64, arm64, armhf, i386, powerpc, ppc64el` (it's not even the latest available for *trusty* or what was Ubuntu 14.04). I'd not recommend using that *unpatched* package; instead remove it.
AKSHAY NAIR avatar
za flag
@Nmath Please check the query now, i have added the outputs
AKSHAY NAIR avatar
za flag
@guiverc i am not sure how this package got installed in the system, i found it out the moment i was trying to install this new software
mchid avatar
bo flag
`libpng12-0` is causing trouble. Is there a reason you need this instead of `libpng16-16`?
AKSHAY NAIR avatar
za flag
@Nmath Thanks, it worked, i have removed the Trusty repo from the updates tab and then upgraded, its resolved
Score:1
ng flag

It looks like you have trusty repos added to your system. These will need to be removed because adding sources from other Ubuntu versions can break package management and can prevent you from updating or adding new software.

Make a backup of /etc/apt/sources.list and then edit that file removing the lines that have trusty. You can also "comment out" individual lines by adding a # in front of them. Commented lines will be ignored in your sources lists.

If you don't see any trusty lines in /etc/apt/sources.list, they could be in another .list file under /etc/apt/.

Alternatively, you can review and disable sources in the GUI software center.

After you do this, you should run sudo apt update and then try again with the sudo apt --fix-broken install and then sudo apt upgrade. If this resolves errors and brings your system up-to-date you should be able to install new software.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.