0

I have tried the following for this error:

sudo apt-get update --fix-missing
sudo dpkg --configure -a
sudo apt-get install -f
sudo apt upgrade

But I get the same error. I have actually purged mysql and mariadb and have been trying to reinstall them. I need to install mariadb-server and I am getting this error (title). Then, I saw a post that says to use aptitude. And when I try to install aptitude or mariadb-server I get this error.

This is my /etc/apt/sources.list file after modifying it:

deb http://archive.ubuntu.com/ubuntu focal universe

Error trace

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies: aptitude : Depends: libboost-iostreams1.71.0 but it is not installable Depends: libcwidget4 (>= 0.5.18-1) but it is not going to be installed Depends: libsigc++-2.0-0v5 (>= 2.8.0) but it is not installable Recommends: libparse-debianchangelog-perl but it is not going to be installed E: Unable to correct problems, you have held broken packages.

I am using Ubuntu 20.04

This is the apt policy aptitude:

aptitude:
  Installed: (none)
  Candidate: 0.8.12-1ubuntu4
  Version table:
     0.8.12-1ubuntu4 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages

Thanks in advance!

1 Answers1

0

I'm quite confused by what your sources list really looks like. Your initial post listed repos from bionic and trusty. Now you say your system is focal and show a sources list that contains only the focal universe repo.

However, this may actually be the case. For example, apt is complaining about not being able to install libboost-iostreams1.71.0 which is in the main repo. So perhaps you truly don't have that repo in your sources list, and that would explain why you can't install aptitude.

If that is the true state of your sources list, you can either refer to the instructions in the answers to How do I restore the default repositories? or use this default focal sources list.

deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse

Then update your system. If your sources list was really what you showed earlier, you may experience major problems at this step. If you can get through the upgrade, you should then be able to install aptitude.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • 1
    thank you so much, this really helped. I was able to restore the default repositories and successfully get mariadb installed. – divyashie Oct 27 '22 at 07:21