Vagrant: Update documentation to ensure libarchive-tools or bsdtar package is installed - Concerns Ubuntu Focal 20.04 users as of yet

Created on 12 Nov 2020  路  2Comments  路  Source: hashicorp/vagrant

Vagrant version

$ vagrant --version
Vagrant 2.2.13

Host operating system

Ubuntu 20.04 LTS

Guest operating system

Ubuntu 20.04 LTS

Actual behavior

OS Versions like Ubuntu 20.04 no longer have bsdtar package available in the repositories.

Instead, libarchive-tools is available - which replaces bsdtar and sets up the bsdtar binary file on the system.

Although, per my testing this was the case for Ubuntu 20.04 .. it may likely be possible that there may be some other OS versions that may reflect this case.

While the vagrant repository does state bsdtar should be available beforehand, would like to humbly request for a slight modification to documentation to include something like either bsdtar or libarchive-tools should be in installed state on the system.

Steps to reproduce

Quickly with a docker container

  1. docker run -it ubuntu:focal /bin/bash
  2. apt-get update && apt-cache policy bsdtar (once in container, update repository cache and there likely won't be a candidate package)
  3. apt-get cache policy libarchive-tools (should have a candidate package)

References

Ubuntu Repository search for bsdtar
Ubuntu Repository search for libarchive-tools

Most helpful comment

Running

sudo apt install libarchive-tools

fixes this. But it is not mentioned in the documentation as the author of the issue indicates.

All 2 comments

I'm having this same issue and I was going to open a new issue but I found this one, so I'll paste my isue description here:

Vagrant version

Installed from binary downloaded from Vagrant Website.
Located at /usr/local/bin/vagrant

$ vagrant --version
Vagrant 2.2.13

Host operating system

Ubuntu 20.04.1 LTS

Guest operating system

This box: https://app.vagrantup.com/laravel/boxes/homestead

Expected behavior

To get the box downloaded and created without errors.

Actual behavior

```$ vagrant box add laravel/homestead
==> box: Loading metadata for box 'laravel/homestead'
box: URL: https://vagrantcloud.com/laravel/homestead
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.

1) hyperv
2) parallels
3) virtualbox
4) vmware_desktop

Enter your choice: 3
==> box: Adding box 'laravel/homestead' (v10.1.1) for provider: virtualbox
box: Downloading: https://vagrantcloud.com/laravel/boxes/homestead/versions/10.1.1/providers/virtualbox.box
==> box: Box download is resuming from prior download progress
Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com
box: Calculating and comparing box checksum...
The executable 'bsdtar' Vagrant is trying to run was not
found in the PATH variable. This is an error. Please verify
this software is installed and on the path.

### Steps to reproduce

1. Download Vagrant and move to /usr/local/bin
2. Run vagrant box add laravel/homestead

### References

Similar issues have been reported before in older versions of Vagrant.
For example:
- #6390
- #8556
- #3674

### Other notes

Previous issues indicate that libarchive must be installed. I checked and that package comes already installed with Ubuntu.

$ dpkg -l | grep libarchive
ii libarchive-cpio-perl 0.10-1 all module for manipulations of cpio archives
ii libarchive-zip-perl 1.67-2 all Perl module for manipulation of ZIP archives
ii libarchive13:amd64 3.4.0-2ubuntu1 amd64 Multi-format archive and compression library (shared library)


$ locate bsdtar
/snap/core20/634/usr/share/bash-completion/completions/bsdtar
/usr/share/bash-completion/completions/bsdtar
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/19.08/b05888992f5d9e089bc3eb115d0b2998b394c84af1a001044844aac1b180a929/files/bin/bsdtar
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/20.08/99666aa95651104a247e446309140c3641d0f43902240b57de11657a2fc1944f/files/bin/bsdtar
/var/lib/flatpak/runtime/org.gnome.Platform/x86_64/3.36/b4a69573f2af7ca3038708b8b21d43f6977d6d50bb7006ecf1a83b59f08c67d7/files/bin/bsdtar
```

I didn't find mentions about installing bsdtar or any other dependency in Vagrant's documentation.

Running

sudo apt install libarchive-tools

fixes this. But it is not mentioned in the documentation as the author of the issue indicates.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rrzaripov picture rrzaripov  路  3Comments

bbaassssiiee picture bbaassssiiee  路  3Comments

cbednarski picture cbednarski  路  3Comments

DreadPirateShawn picture DreadPirateShawn  路  3Comments

tomhking picture tomhking  路  3Comments