FS#56313 - [vagrant] Unable to run Vagrant after full system update (easy fix included)

Attached to Project: Community Packages
Opened by Alexander Nye (anye) - Monday, 13 November 2017, 14:11 GMT
Last edited by Jonathan Steel (jsteel) - Wednesday, 04 July 2018, 16:14 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jonathan Steel (jsteel)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

After latest `pacman -Syyu`, with updates from Sunday, November 12th, 2017:

`vagrant-substrate` was replaced with https://www.archlinux.org/packages/community/x86_64/vagrant/

After which I started getting the following error when attempting to run `vagrant up`:
`Exec error: fork/exec /opt/vagrant/embedded/bin/ruby: no such file or directory`

This lead me to this prior, similar bug report:
https://github.com/hashicorp/vagrant/issues/1559

I was able to fix the bug myself when I saw that `/opt/vagrant/embedded/bin` did not exist, created that directory, and created a symlink to my system ruby inside of it:
`sudo ln -T $(which ruby) /opt/vagrant/embedded/bin/ruby`
This task depends upon

Closed by  Jonathan Steel (jsteel)
Wednesday, 04 July 2018, 16:14 GMT
Reason for closing:  Works for me
Comment by Cesar (darkston) - Monday, 13 November 2017, 16:18 GMT
hello, thanks for the fix
but i have other problem when attempting to run 'vagrant box update':

There was an error while downloading the metadata for this box.
The error message is shown below:

error setting certificate verify locations:
CAfile: /opt/vagrant/embedded/cacert.pem
CApath: none

I'd appreciate your help
Comment by Omar Zina (zomarina) - Monday, 13 November 2017, 18:09 GMT
Same here. Thanks for the workaround @anye, working fine now.
Comment by Jonathan Steel (jsteel) - Monday, 13 November 2017, 18:34 GMT
Can you share a (simple as possible) Vagrantfile that gives you this issue? Also what's the output of:

which vagrant

vagrant --version
Comment by Omar Zina (zomarina) - Monday, 13 November 2017, 18:41 GMT
▶ which vagrant
/usr/bin/vagrant

▶ vagrant --version
Vagrant 2.0.1

Vagrant file:

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

config.vm.box = "bento/centos-7.2"
config.vm.box_check_update = false


config.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = 8192
vb.cpus = 2
vb.customize ["modifyvm", :id, "--cpuexecutioncap", "80"]
end
end
Comment by Jonathan Steel (jsteel) - Monday, 13 November 2017, 18:56 GMT
OK odd, works for me. Have you got any plugins installed? I wonder if they need to be rebuilt; can you try uninstalling all plugins and see if it's OK then? (vagrant plugin list and vagrant plugin uninstall). If it's OK try installing/building the plugins again.
Comment by Omar Zina (zomarina) - Monday, 13 November 2017, 19:00 GMT
"No plugins installed."
Maybe the original reporter has anything more useful to add.

Comment by Alexander Nye (anye) - Monday, 13 November 2017, 23:22 GMT
/usr/bin/vagrant

Vagrant 2.0.1

Plugins:
vagrant-librarian-chef-nochef (0.2.0)
vagrant-vbguest (0.15.0)

Vagrantfile below this line
--------------------------------
# -*- mode: ruby -*-

VAGRANTFILE_API_VERSION = '2'
REQUIRED_PLUGINS = ['vagrant-vbguest']

REQUIRED_PLUGINS.reject {|plugin| Vagrant.has_plugin? plugin}.each do|plugin|
if not system "vagrant plugin install #{plugin}"
abort "could not install #{plugin}"
end
end

Vagrant.configure VAGRANTFILE_API_VERSION do|config|
config.vm.box = 'ubuntu/trusty64'

config.vm.provider :virtualbox do|virtualbox|
virtualbox.customize ['modifyvm', :id, '--memory', '2048']
end

config.vm.network :forwarded_port, guest: 3000, host: 3000

config.vm.provision :chef_solo do|chef|

chef.cookbooks_path = %w[cookbooks]

chef.add_recipe 'aae::setup'

end
end
Comment by Alexander Nye (anye) - Monday, 13 November 2017, 23:34 GMT
My bad, I should have mentioned that I'm running the Manjaro spinoff. I figured this was a base package issue though.

`uname -a` -> `Linux absurd-reckonings 4.14.0-1-MANJARO #1 SMP PREEMPT Wed Nov 1 18:24:41 UTC 2017 x86_64 GNU/Linux`
Comment by Jonathan Steel (jsteel) - Tuesday, 14 November 2017, 07:12 GMT
Then report this issue to Manjaro. Does anyone have this issue on Arch?
Comment by Omar Zina (zomarina) - Tuesday, 14 November 2017, 13:18 GMT
I'm sorry, i made the same mistake, i'm on manjaro too. Don't know where else to report this as the only place I found was here (after searching for the maintainer of the package), though.
Comment by Jonathan Steel (jsteel) - Tuesday, 14 November 2017, 13:25 GMT
What does "pacman -Qi vagrant" give you? I'm interested to see if I'm the packager for that package.
Comment by Omar Zina (zomarina) - Tuesday, 14 November 2017, 13:28 GMT
▶ pacman -Qi vagrant
Name : vagrant
Version : 2.0.1-1
Description : Build and distribute virtualized development environments
Architecture : x86_64
URL : https://vagrantup.com
Licenses : MIT
Groups : None
Provides : None
Depends On : curl libarchive libssh2 libxml2 libxslt rsync ruby xz
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : vagrant-substrate
Replaces : vagrant-substrate
Installed Size : 26,23 MiB
Packager : Jonathan Steel <jsteel@archlinux.org>
Build Date : vie 03 nov 2017 09:51:46 -03
Install Date : lun 13 nov 2017 14:58:25 -03
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature

Comment by Jonathan Steel (jsteel) - Tuesday, 14 November 2017, 13:33 GMT
OK thanks, I wondered if they built their own packages but looks like (on this occasion) they are using ours. I'm afraid we don't support Manjaro, and it works on Arch. Don't Manjaro have their own bug tracker?

If you create an Arch VM and can replicate the problem there I'd be happy to look into it further, but I think you'll find it's OK.
Comment by Omar Zina (zomarina) - Tuesday, 14 November 2017, 13:46 GMT
The issue has been reported on manjaro forums yesterday (didn't found it yesterday when I looked for it), and it links to the workaround given by anye here, besides downgrading.
For reference https://forum.manjaro.org/t/stable-update-2017-11-12-kernels-plasma5-deepin-cinnamon-end-of-life-for-32bit-support/34635/43.
Also, thank you!
Comment by 0x11de784a (0x11de784a) - Friday, 22 June 2018, 15:46 GMT
On actual Arch Linux, the state problem happens on my system now too. Never used Vagrant before (at all or on Arch).

Every `vagrant` command (even `--version`) fails with the missing error `Exec error: fork/exec /opt/vagrant/embedded/bin/ruby: no such file or directory`.
Comment by Jonathan Steel (jsteel) - Monday, 25 June 2018, 18:52 GMT
Can you show me the result of: cat /etc/os-release
Comment by 0x11de784a (0x11de784a) - Monday, 25 June 2018, 19:17 GMT
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
ID_LIKE=archlinux
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
Comment by Jonathan Steel (jsteel) - Monday, 25 June 2018, 19:43 GMT
OK thanks, looks fine to me, I know Vagrant reads that file and could look in /opt/ if it thinks it isn't Arch. Sorry, I cannot reproduce this bug. You'll have to try and debug this yourself or report upstream.

Loading...