missing liblxc when installing
developerinlondon opened this issue · 3 comments
developerinlondon commented
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
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
Yes, you need lxc-dev or equivalent package on your distribution to be able to compile ruby-lxc.
developerinlondon commented
awesome thanks! That worked!