Cant Install Vagrant on CentOS 6.4

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Cant Install Vagrant on CentOS 6.4

Robert Parker
I'm having trouble installing vagrant on Centos 6.4.  I have successfully installed VirtualBox and Ruby:

[root@mybox vagrant]# uname -a
Linux mybox.nunya.biz 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

 [root@mybox vagrant]# cat /etc/centos-release 
CentOS release 6.4 (Final)

[root@mybox vagrant]# rpm -qa | grep ruby
ruby-libs-1.8.7.352-10.el6_4.x86_64
rubygems-1.3.7-1.el6.noarch
ruby-1.8.7.352-10.el6_4.x86_64
ruby-rdoc-1.8.7.352-10.el6_4.x86_64
ruby-devel-1.8.7.352-10.el6_4.x86_64
ruby-irb-1.8.7.352-10.el6_4.x86_64

[root@mybox vagrant]# rpm -qa | grep Virt
VirtualBox-4.2-4.2.16_86992_el6-1.x86_64

However, when I try the RPM install I get:

[root@mybox vagrant]# rpm -ivh http://files.vagrantup.com/packages/vagrant_1.2.7_x86_64.rpm
Retrieving http://files.vagrantup.com/packages/7ec0ee1d00a916f80b109a298bab08e391945243/vagrant_1.2.7_x86_64.rpm
Preparing...                ########################################### [100%]
   1:vagrant                ########################################### [100%]

[root@mybox vagrant]# vagrant init
/opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/hosts/fedora/host.rb:39:in `block in initialize': undefined method `[]' for nil:NilClass (NoMethodError)
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/hosts/fedora/host.rb:38:in `open'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/hosts/fedora/host.rb:38:in `open'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/hosts/fedora/host.rb:38:in `initialize'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:502:in `new'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:502:in `host'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:514:in `block in action_runner'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:28:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:28:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:275:in `hook'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:136:in `initialize'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/bin/vagrant:62:in `new'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/bin/vagrant:62:in `<top (required)>'
        from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
        from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

When I try the gem install I get:

[root@mybox vagrant]# gem install vagrant
Building native extensions.  This could take a while...
ERROR:  Error installing vagrant:
        ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... no
checking for rb_thread_call_without_gvl()... no
checking for ffi_prep_cif_var()... no
creating extconf.h
creating Makefile

make
Configuring libffi
configure: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used
configure: error: in `/usr/lib64/ruby/gems/1.8/gems/ffi-1.9.0/ext/ffi_c/libffi-x86_64-linux':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** ["/usr/lib64/ruby/gems/1.8/gems/ffi-1.9.0/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a] Error 77


Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/ffi-1.9.0 for inspection.
Results logged to /usr/lib64/ruby/gems/1.8/gems/ffi-1.9.0/ext/ffi_c/gem_make.out

Any idea what the issue is here?  What am I missing? 

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Cant Install Vagrant on CentOS 6.4

Mitchell Hashimoto
This looks like a bug in Vagrant. What is the contents of "/cat/redhat-release"

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Cant Install Vagrant on CentOS 6.4

Robert Parker
[root@mybox ~]# cat /etc/redhat-release 
CentOS release 6.4 (Final)

On Monday, July 29, 2013 10:35:51 AM UTC-5, Mitchell Hashimoto wrote:
This looks like a bug in Vagrant. What is the contents of "/cat/redhat-release"

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Cant Install Vagrant on CentOS 6.4

Stephen Brown
In reply to this post by Mitchell Hashimoto
I found the same I had a similar problem today when I upgraded from 1.4 to 1.7
/opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/hosts/fedora/host.rb:39:in `block in initialize': undefined method `[]' for nil:NilClass (NoMethodError)
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/hosts/fedora/host.rb:38:in `open'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/hosts/fedora/host.rb:38:in `open'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/hosts/fedora/host.rb:38:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:502:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:502:in `host'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:514:in `block in action_runner'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:28:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:28:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:275:in `hook'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:136:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/bin/vagrant:62:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/bin/vagrant:62:in `<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'


so I tried from 1.6 and 1.5 same problem
platform_stable$ vagrant --help
/opt/vagrant/embedded/gems/gems/vagrant-1.2.6/plugins/hosts/fedora/host.rb:39:in `block in initialize': undefined method `[]' for nil:NilClass (NoMethodError)
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/plugins/hosts/fedora/host.rb:38:in `open'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/plugins/hosts/fedora/host.rb:38:in `open'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/plugins/hosts/fedora/host.rb:38:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/environment.rb:502:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/environment.rb:502:in `host'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/environment.rb:514:in `block in action_runner'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/action/runner.rb:28:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/action/runner.rb:28:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/environment.rb:275:in `hook'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/environment.rb:136:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/bin/vagrant:62:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.6/bin/vagrant:62:in `<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
/platform_stable$ vagrant --help
/opt/vagrant/embedded/gems/gems/vagrant-1.2.5/plugins/hosts/fedora/host.rb:39:in `block in initialize': undefined method `[]' for nil:NilClass (NoMethodError)
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/plugins/hosts/fedora/host.rb:38:in `open'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/plugins/hosts/fedora/host.rb:38:in `open'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/plugins/hosts/fedora/host.rb:38:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/lib/vagrant/environment.rb:502:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/lib/vagrant/environment.rb:502:in `host'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/lib/vagrant/environment.rb:514:in `block in action_runner'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/lib/vagrant/action/runner.rb:28:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/lib/vagrant/action/runner.rb:28:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/lib/vagrant/environment.rb:275:in `hook'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/lib/vagrant/environment.rb:136:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/bin/vagrant:62:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.5/bin/vagrant:62:in `<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'


cat /etc/redhat-release 
CentOS release 6.4 (Final)


rpm -qa | grep ruby
rubygem-stomp-1.2.2-1.el6.noarch
ruby-rdoc-1.8.7.352-10.el6_4.x86_64
rubygems-1.8.10-1.el6.noarch
libselinux-ruby-2.0.94-5.3.el6_4.1.x86_64
ruby-augeas-0.4.1-1.el6.x86_64
ruby-irb-1.8.7.352-10.el6_4.x86_64
rubygem-json-1.6.6-2.el6.x86_64
ruby-1.8.7.352-10.el6_4.x86_64
ruby-libs-1.8.7.352-10.el6_4.x86_64
ruby-shadow-1.4.1-13.el6.x86_64
rubygem-systemu-1.2.0-3.el6.noarch

Vagrant running fine on 1.4

hope this helps




On Monday, July 29, 2013 4:35:51 PM UTC+1, Mitchell Hashimoto wrote:
This looks like a bug in Vagrant. What is the contents of "/cat/redhat-release"

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Cant Install Vagrant on CentOS 6.4

Stephen Brown
In reply to this post by Robert Parker
Just had a quick look at the code vagrant was
trying to call at the time of 
failure

release_file = Pathname.new("/etc/redhat-release")
 begin
release_file.open("r") do |f|
version_number = /Fedora.*release ([0-9]+)/.match(f.gets)[1].to_i                                                                                                       
if version_number >= 16
@nfs_server_binary = "/usr/sbin/service nfs-server"
 end
 end


It looks like it is only expecting to find the
 word Fedora in the release file, and errors when presented with CentOS (possibly redhat is an option 
here too??)

changing the regex too
version_number = /[Fedora|CentOS].*release ([0-9]+)/.match(f.gets)[1].to_i

has got it working for me


On Monday, July 29, 2013 5:00:00 PM UTC+1, Robert Parker wrote:
[root@mybox ~]# cat /etc/redhat-release 
CentOS release 6.4 (Final)

On Monday, July 29, 2013 10:35:51 AM UTC-5, Mitchell Hashimoto wrote:
This looks like a bug in Vagrant. What is the contents of "/cat/redhat-release"

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.