安装vagrant出错 - Sudo apt-get install Vagrant返回错误:软件包未满足依赖性 - Ubuntu 19.04

问题描述 投票:0回答:1

我试图在我的设备上运行MiniKF,这需要我安装vagrant。我运行的是Ubuntu 19.04。我下载了vagrant,但是当我尝试使用 sudo apt-get install vagrant 我得到以下信息。

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.

我已经尝试使用 sudo apt-get update , sudo apt-get install -f ,尝试编辑 /var/lib/dpkg/status file,尝试删除文件与 sudo apt-get remove 和更多,但没有什么是为我工作。如果有什么好办法,我将非常感激。

linux ubuntu vagrant
1个回答
0
投票

所以,首先要尝试一些非常基本的东西。

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

这都是非常标准的尝试 - 这将尝试清理任何遗留的资源和缓存材料, 然后尝试修复任何破碎或缺失的依赖关系, 然后检查任何未完成的或其他奇怪的安装问题,其他包没有配置自己的方式正确。

在这之后,如果你还是有同样的问题,我猜测是由于Ubuntu 19.04已经是 临终仓库可能没有(读:绝对没有)像Ubuntu 20.04这样的生活中的所有包。即使以上的方法可以解决你的问题,你也应该尽可能地升级到20.04,因为这不会是你在不久的将来出现的第一个关于更新或安装的问题。

© www.soinside.com 2019 - 2024. All rights reserved.