简体   繁体   中英

Error installing vagrant - Sudo apt-get install Vagrant returns error: packages have unmet dependencies - Ubuntu 19.04

I am trying to run MiniKF on my device which requires me to install vagrant. I am running Ubuntu 19.04. I downloaded vagrant, but when I try to install it using sudo apt-get install vagrant I get the following message:

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:
 vagrant : Depends: bsdtar but it is not going to be installed
           Depends: ruby-net-scp (>= 1.1.0) but it is not going to be installed
           Depends: ruby-net-sftp but it is not going to be installed
           Depends: ruby-net-ssh (>= 1:2.6.6) but it is not going to be installed
           Recommends: vagrant-libvirt but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I have tried using sudo apt-get update , sudo apt-get install -f , tried editing the /var/lib/dpkg/status file , tried removing the files with sudo apt-get remove and more but nothing is working for me. Any ideas would be greatly appreciated.

So some very elementary things to try first:

sudo apt clean && sudo apt --fix-missing && sudo dpkg --configure -a

This is all pretty standard stuff to try first - this would attempt to clean any leftover resources and cache materials, then attempt to fix any broken or missing dependencies, then check for any unfinished or otherwise weird installation issues for other packages that didn't configure themselves all the way / correctly.

After that, if you still have the same issue, I'm assuming it's due to the fact that Ubuntu 19.04 is already end of life , and the repositories may not (read: definitely do not) have all the same packages that something that is within life like Ubuntu 20.04 has. Even if the above happens to fix your problem, you should look into upgrading to 20.04 whenever possible, as this won't be your first problem that crops up regarding updates or installation in the near future.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM