2014-06-10 16 views
0

uuid4r宝石安装我收到此错误错误在linux

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

    /home/kiwitech/.rvm/rubies/ruby-1.9.3-p547/bin/ruby extconf.rb --with-opt-include=/usr/local/opt/ossp-uuid/include --with-opt-lib=/home/kiwitech/Documents/ossp-uuid 
checking for uuid_export() in -luuid... no 
*** 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=${opt-dir}/include 
    --with-opt-lib=${opt-dir}/lib 
    --with-make-prog 
    --without-make-prog 
    --srcdir=. 
    --curdir 
    --ruby=/home/kiwitech/.rvm/rubies/ruby-1.9.3-p547/bin/ruby 
    --with-uuidlib 
    --without-uuidlib 
OSSP uuid library 'uuid' required -- not found. 

extconf failed, exit code 1 

Gem files will remain installed in /home/kiwitech/.rvm/gems/ruby-1.9.3-p547/gems/uuid4r-0.2.0 for inspection. 
Results logged to /home/kiwitech/.rvm/gems/ruby-1.9.3-p547/extensions/x86-linux/1.9.1/uuid4r-0.2.0/gem_make.out 

请人帮我

回答

0

您需要安装libossp-uuid和它的开发头。

大概是这样的:

sudo apt-get install libossp-uuid-dev 

然后宝石安装。

您确定您需要使用该宝石吗?在红宝石1.9+中,已经有标准库中的模块SecureRandom,它提供了UUID以及许多纯宝石宝石,如uuidtoolsuuid。如果您需要解析UUID,则有ruby-uuid

0

如果您运行OS X的优胜美地执行以下操作:

创业板安装UUID

冲泡安装OSSP的UUID

(你必须已经安装酿造如果你不这样做。你可以从这里得到:http://brew.sh