0

So, while trying to upgrade to 14.04 I encountered this error:

Could not calculate the upgrade

An unresolvable problem occurred while calculating the upgrade.

Please report this bug against the 'update-manager' package and include the following error message: 'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'

I looked into it and opened the /var/log/dist-upgrade/apt.log log file in a text editor, locating any "broken" packages and remove them with sudo apt-get remove . I had 33 broken packages.

I typed "sudo apt-get update && sudo apt-get upgrade" to see if there were any packages: there were 2 packages which didn't want to update: libboost-filesystem-dev and libboost-thread-dev, so i removed them to see if I was able to get a correct upgrade.

It didn't work.

I'm now getting an error about unresolved dependencies and can't do anything. I tried the following ways to get out of it:

  1. sudo apt-get -f install, this is the output (it's in italian, sorry about that)

http://pastebin.com/y2DTqxdQ

Basing on this, it can't install this "usermetricsservice_1.1.1+13.10.20131003-0ubuntu1_amd64.deb" and even using software center opening it manually, gives error.

  1. sudo apt-get -u dist-upgrade, similar output as before

http://pastebin.com/k6DETpzV

This is the output with "sudo dpkg --configure -a" : http://pastebin.com/SEj83RSP

Edit: After rebooting, I managed to fix the broken dependencies through "sudo apt-get -f install", still I can't upgrade ubuntu for the same error as before and I'm not sure sure what's the problem here.

This is the output of "sudo lsof /etc/subuid"

lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
  Output information may be incomplete.

3 Answers 3

2

I had that error just one moment ago, and finally I've resolved. I did this:

1- Try $ sudo useradd nickname.

2- The response, if you have the error, should be like this: 'useradd: existing lock file /etc/subgid.lock without a PID useradd: cannot lock /etc/subgid, please try again.'

3- Now you have to remove all the files that are making the error, they are, in my case subgid.lock. (You can see that in the response says 'existing lock file /etc/subgid.lock', so you have to remove all files that is put in the response). Do this: $ sudo mv subgid.lock /home/youruser/subuid.lock.sav. Substituting subgid.lock for your error file.

4- Try again $ sudo useradd nickname. If shows other error file, remove it. If no more error files are there, you should get now the new user.

This was very useful for me, so I hope that you can fix the problem =). And sorry for my english because I'm spanish. Good bye and good luck.

1

I was facing similar problem when trying to install hadoop usergroup hduser and I solved it by removing the two files. Here is the error I was getting:

useradd: existing lock file /etc/subuid.lock without a PID useradd: cannot lock /etc/subuid; try again later.

solution:

sudo rm /etc/subgid.lock
sudo rm /etc/subgid
0

You most likely have another instance of useradd running at the time. You can figure this out using:

sudo lsof /etc/subuid

I don't have the file on my system, but it's provided by passwd package. I would recommend you verify that no process is blocking the file, then restart the system if it doesn't work.

3
  • 1
    This is the output, after restarting the system, the situation looks the same: lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete.
    – fedexist
    May 2, 2014 at 16:54
  • @fedexist you used sudo? Also, edit your question and add the output of ls /etc/subuid
    – Braiam
    May 2, 2014 at 16:56
  • Wait, "apt-get -f install" looks like it worked this one time. I'll see if i can update with more informations on the current situation.
    – fedexist
    May 2, 2014 at 16:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .