I am new to ubuntu i am trying to install vagrant but i am getting following error:

gp@ubuntu:~/Downloads/gnupg-2.2.13$ sudo apt install vagrant
[sudo] password for gp: 
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:
 gnupg : Breaks: software-properties-common (<= but is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages
  • Looks like you have been doing something weird with gnupg... What's the output of apt-cache policy gnupg? – fkraiem Feb 24 '19 at 17:21
  • gnupg: Installed: 1.4.20-1ubuntu3.1 Candidate: 2.2.4-1ubuntu1.2 Version table: 2.2.4-1ubuntu1.2 500 500 us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages 500 security.ubuntu.com/ubuntu bionic-security/main amd64 Packages 2.2.4-1ubuntu1 500 500 us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages *** 1.4.20-1ubuntu3.1 100 100 /var/lib/dpkg/status – gaurav Feb 24 '19 at 18:03
  • 2
    Yup, you have a gnupg package from 16.04, but you are running 18.04. Why is this package not upgraded? – fkraiem Feb 24 '19 at 18:08
  • Looks like you have unwisely added a wrong-version source which provides packages that are incompatible with your release of Ubuntu. Remove all packages you installed from that unwise source, then delete that source. – user535733 Feb 24 '19 at 19:56
  • @fkraiem I am not sure why this has happened but what to do now? I am trying to upgrade it but i am getting following error: E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ so what to do now? – gaurav Feb 26 '19 at 18:55

I had the same issue with a failed apt-get dist-upgrade. apt-get upgrade would just silently fail, but state that many packages weren't upgraded.

I upgraded gnupg individually and all was sorted out after that:

sudo apt install --only-upgrade gnupg
New contributor
gumroler is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.