Score:2

The package system is broken. Unable to fix it

uz flag

I tried multiple things online to fix this like running sudo apt-get -f install and sudo apt-get clean

this is what I get when I try to update with software updater:

Check if you are using third party repositories. If so disable them, since they are a common source of problems.
Furthermore run the following command in a Terminal: apt-get install -f
Transaction failed: The package system is broken
 The following packages have unmet dependencies:

libpam-modules: PreDepends: libaudit1 (>= 1:2.2.1) but 1:2.8.5-2ubuntu6 is installed
                PreDepends: libc6 (>= 2.27) but 2.31-0ubuntu9.2 is installed
                PreDepends: libcrypt1 (>= 1:4.1.0) but 1:4.4.10-10ubuntu4 is installed
                PreDepends: libselinux1 (>= 2.1.9) but 3.0-1build2 is installed
                PreDepends: libpam-modules-bin (= 1.3.1-5ubuntu4.2) but 1.3.1-5ubuntu4.3 is installed

I tried to follow this guide's answer. but it didn't help: How do I resolve unmet dependencies after adding a PPA?

outcome of sudo apt-get update :

E: The repository 'http://ppa.launchpad.net/nathan-renniewaldock/flux/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I'm running version 20.04 btw. I'm a noob so I'm not sure what I'm doing i just need to get this fixed

edit: outcome of sudo get update :

Hit:1 http://archive.canonical.com/ubuntu focal InRelease
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:3 http://de.archive.ubuntu.com/ubuntu focal InRelease                               
Hit:4 http://de.archive.ubuntu.com/ubuntu focal-updates InRelease
Get:5 http://de.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [29,0 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [63,7 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2.464 B]
Fetched 310 kB in 2s (148 kB/s)               
Reading package lists... Done
Building dependency tree       
Reading state information... Done
58 packages can be upgraded. Run 'apt list --upgradable' to see them.

outcome of sudo get 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:
 libpam-modules : PreDepends: libpam-modules-bin (= 1.3.1-5ubuntu4.2)
                  Recommends: update-motd but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

outcome of apt --fix-broken install

apt --fix-broken 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:
  libgsoap-2.8.91 libllvm11 liblzf1 libvncserver1 shim virtualbox-dkms
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libpam-modules
Recommended packages:
  update-motd
The following packages will be upgraded:
  libpam-modules
1 upgraded, 0 newly installed, 0 to remove and 57 not upgraded.
Need to get 0 B/260 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 258871 files and directories currently installed.)
Preparing to unpack .../libpam-modules_1.3.1-5ubuntu4.3_amd64.deb ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing archive /var/cache/apt/archives/libpam-modules_1.3.1-5ubuntu4.3_amd64.deb (--unpack):
 new libpam-modules:amd64 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libpam-modules_1.3.1-5ubuntu4.3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

outcome of sudo apt autoremove

sudo apt autoremove
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:
 libpam-modules : PreDepends: libpam-modules-bin (= 1.3.1-5ubuntu4.2)
                  Recommends: update-motd but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

output of apt policy libpam-modules

libpam-modules:
  Installed: 1.3.1-5ubuntu4.2
  Candidate: 1.3.1-5ubuntu4.3
  Version table:
     1.3.1-5ubuntu4.3 500
        500 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
 *** 1.3.1-5ubuntu4.2 100
        100 /var/lib/dpkg/status
     1.3.1-5ubuntu4 500
        500 http://de.archive.ubuntu.com/ubuntu focal/main amd64 Packages

I can't install Synaptic Package Manager since I can't install any programs

Nmath avatar
ng flag
How many PPAs do you have installed and how many of those are maintained by the PPA? You should read: [Are PPAs safe to add to my system...](https://askubuntu.com/q/35629) and [What can I do if a repository/PPA does not have a Release file?](https://askubuntu.com/q/866901). PPA is not always the best way to add software to your system and outdated PPAs can pull in dependencies that break dependencies for other software. You should remove any problematic PPAs and try again to update your software
user535733 avatar
cn flag
It's right there in your output: `Check if you are using third party repositories. If so disable them, since they are a common source of problems.`
uz flag
@user535733 explain to me like I'm your grandma. because I don't even understand what third party repositories is. i enabled/disabled them one for one but it didn't make a difference
uz flag
@Nmath okay so how can I delete http://ppa.launchpad.net/nathan-renniewaldock/flux/ubuntu ?
user535733 avatar
cn flag
Third Party = Not Ubuntu = Somebody Else. Example: PPA.
Nmath avatar
ng flag
The answer posted by @Bill Miller explains how to remove the PPA.
uz flag
@Nmath now I don't get any errors now when i use `sudo apt-get update`. but the problem remains. the package system is still broken
Nmath avatar
ng flag
Assuming you've already tried `sudo apt-get -f install` again. Can you update your question and include the full output of both `sudo apt update` and `sudo apt upgrade`
uz flag
@Nmath I edited my thread
Nmath avatar
ng flag
Run `sudo apt autoremove` and try again
uz flag
@Nmath I posted the outcome of that command as well
Nmath avatar
ng flag
`libpam-modules` seems to be the offending package. Getting to the point where a solution might crash the system further so make sure your backups are in order. You can run `sudo apt purge libpam-modules` which will remove this package which should allow you to `autoremove` `update` and `upgrade` again. When you purge this package, before proceeding take a look at any other packages it wants to remove with it. If it's a huge list or includes things like your DE or other software, just copy paste the output here and `N` and we can troubleshoot further
uz flag
@Nmath updated the thread and for the commands upgrade and update I just got ``` The following packages have unmet dependencies: libpam-modules : PreDepends: libpam-modules-bin (= 1.3.1-5ubuntu4.2) Recommends: update-motd but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). ``` again
Nmath avatar
ng flag
Did you purge libpam-modules?
uz flag
@Nmath yes i did and got "E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)." again
karel avatar
sa flag
Does this answer your question? ["debconf: DbDriver "config": config.dat is locked by another process: Resource temporarily unavailable" while installing packages](https://askubuntu.com/questions/136881/debconf-dbdriver-config-config-dat-is-locked-by-another-process-resource-t)
uz flag
@karel yes finally I ran `sudo rm /var/cache/debconf/*.dat` and I now I'm able to install new programs and run the software updater. thanks :)
karel avatar
sa flag
@yussi If the above link answered your question please confirm it by clicking the "Yes" radio button to the right of where it says "Does this answer your question?" in the light blue banner above your question.
Score:1
dj flag

Step 1 is to remove the broken repository from your sources list. It is not available for 20.04 Focal.

You can either do this by opening the Software and Updates tool, clicking on the Other Software tab, and then unticking the box by the repository, or by typing sudo add-apt-repository -r ppa:nathan-renniewaldock/flux in a terminal.

If you did the latter procedure, do a sudo apt update.

OK, there are still problems after that.

Step 2 revised

Looking at the output of apt policy libpam-modules ---

There is an orphaned version of the package, 1.3.1-5ubuntu4.2 installed. It did not come from the normal repositories. It looks like you added a ppa, installed the package from it, then removed the ppa. Or installed it some other non standard way.

I would try using Synaptic Package Manager to force install 1.3.1-5ubuntu4.3. If it lets you on a broken system. But carefully examine the suggested changes before you accept them

uz flag
HI I can't install Synaptic Package Manager since I can't install any programs.
Bill Miller avatar
dj flag
@yussi by chance do you have `aptitude` installed? You can force a version with that (if it lets you on a broken system)
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.