choz@Choz-Liu:~$ sudo apt-get -f 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
E: Unable to correct problems, you have held broken packages.
choz@Choz-Liu:~$ sudo apt-get install bsdtar
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:
bsdtar : Depends: libarchive13 (= 3.1.2-11build1) but 3.1.2-11ubuntu0.16.04.2 is to be installed
E: Unable to correct problems, you have held broken packages.
-
Welcome to Ask Ubuntu! Did you try any of [these](http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa) answers? If you did, what didnt work? – M. Becerra Dec 15 '16 at 16:35
-
Could you please [edit] your question to include the output of `apt-cache policy bsdtar libarchive13`? Thanks. – David Foerster Apr 20 '18 at 09:43
2 Answers
There appears to be an open bug for this: https://bugs.launchpad.net/ubuntu/+source/vagrant/+bug/1503565
User Matthew Giassa (mgiassa) from that page has a potential workaround:
Matthew Giassa (mgiassa) wrote on 2016-10-07:
Recently encountered this issue on Ubuntu 16.04.1 on 4.4.0-38-generic #57-Ubuntu SMP.
Seems the build label in
libarchive13is either incorrect, orbsdtaris expecting the wrong version.I was able to fix this via:
apt-get download bsdtar mkdir temp_out dpkg-deb -R
bsdtar_3.1.2-11build1_amd64.deb temp_out
# Modify the "control file in temp_out/DEBIAN, changed version from "3.1.2-11build1" to "3.2.1-2~ubuntu16.04.1." Save, close.
dpkg-deb -b temp_out FIXED_bsdtar.deb
sudo dpkg -i ./FIXED_bsdtar.deb
Afterwards, I was able to successfully install and use vagrant via: "sudo apt-get install vagrant". The only downside to this approach is I'll eventually have to resolve this manually when the bsdtar package is actually fixed.
This probably isn't great as a long-term solution, so you may want to just download vagrant for the moment until the bug is patched.
-
thanks! mgiassa's method didn't work for me. But i successfully installed vagrant by downloading it from their website, as you mentioned. ~ – kororo Dec 16 '16 at 09:33
Download bsdtar suited for Debian 16.04 (mainly for libarchive13 in U16.04): https://packages.ubuntu.com/xenial/amd64/bsdtar/download
wget -P /tmp http://security.ubuntu.com/ubuntu/pool/universe/liba/libarchive/bsdtar_3.1.2-11ubuntu0.16.04.3_amd64.debInstall it locally:
apt install /tmp/bsdtar_3.1.2-11ubuntu0.16.04.3_amd64.debThen vagrant can be installed:
apt install vagrant
- 35,754
- 55
- 92
- 145
- 11
- 1
- 2