2013-06-24 41 views
1

安装qrscanner宝石当运行gem包qrscanner,我有以下错误:无法在Ubuntu

Building native extensions. This could take a while... 
ERROR: Error installing qrscanner: 
ERROR: Failed to build gem native extension. 

    /home/kasuka/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb 

make 
pwd ; cd zxing ; python scons/scons.py lib DEBUG=0 PIC=1 
/home/kasuka/.rvm/gems/ruby-1.9.2-p320/gems/qrscanner-0.4.1/ext/qrscanner 
scons: Reading SConscript files ... 

scons: warning: Two different environments were specified for target magick/src/MagickBitmapSource.o, 
    but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES 

然而,当我加入须藤:

Building native extensions. This could take a while... 
ERROR: Error installing qrscanner: 
    ERROR: Failed to build gem native extension. 

     /usr/bin/ruby1.9.1 extconf.rb 
extconf.rb:4: Use RbConfig instead of obsolete and deprecated Config. 

make 
pwd ; cd zxing ; python scons/scons.py lib DEBUG=0 PIC=1 
/var/lib/gems/1.9.1/gems/qrscanner-0.4.1/ext/qrscanner 
scons: Reading SConscript files ... 

scons: warning: Two different environments were specified for target magick/src/MagickBitmapSource.o, 
    but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES 

我使用的红宝石1.9 .2值得一提的是extconf.rb文件在所提到的两个位置都不存在。

回答

0

read the documentation of the gem at https://github.com/andys/qrscanner

and install these dependencies before you install the gem.

Dependencies 
------------ 

* Python (for ZXing build script) 
* ImageMagick: libMagick++, libMagickWand, libMagickCore 
* gcc, g++, libstd++ 
* Operating system with a PREFIX of "/usr".