lxc / ruby-lxc

ruby bindings for liblxc
https://linuxcontainers.org/lxc
GNU Lesser General Public License v2.1
133 stars 29 forks source link

missing liblxc when installing #24

Closed developerinlondon closed 10 years ago

developerinlondon commented 10 years ago

any ideas?

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb 
checking for lxc_container_new() in -llxc... no
missing liblxc
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/local/rvm/rubies/ruby-2.1.2/bin/ruby
    --with-lxclib
    --without-lxclib

extconf failed, exit code 1

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.2/bundler/gems/ruby-lxc-6024d0e40beb for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.1.2/bundler/gems/extensions/x86_64-linux/2.1.0/ruby-lxc-6024d0e40beb/gem_make.out
An error occurred while installing ruby-lxc (1.2.0), and Bundler cannot continue.
br0ch0n commented 10 years ago

Yes, that had me confused for a bit too. You need (on ubuntu anyway) lxc-dev:

root@lxchost1:~# apt-get install lxc lxc-dev build-essential ruby-dev
root@lxchost1:~# gem install ruby-lxc

Hope this helps.

andrenth commented 10 years ago

Yes, you need lxc-dev or equivalent package on your distribution to be able to compile ruby-lxc.

developerinlondon commented 10 years ago

awesome thanks! That worked!