我安装rqr时出错了 有没有人知道这个comiling错误的原因?
---> lib
---> lib/rqr
<--- lib/rqr
<--- lib
---> ext
---> ext/rqr
/usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby /home/bulleric/Desktop/rqr-0.2.2/ext/rqr/extconf.rb
checking for jpeglib.h... yes
checking for main() in -ljpeg... yes
checking for png.h... yes
checking for main() in -lpng... yes
checking for tiff.h... yes
checking for main() in -ltiff... yes
creating Makefile
<--- ext/rqr
<--- ext
---> lib
---> lib/rqr
<--- lib/rqr
<--- lib
---> ext
---> ext/rqr
make
g++ -I. -I/usr/local/rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/usr/local/rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/usr/local/rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I/home/bulleric/Desktop/rqr-0.2.2/ext/rqr -DHAVE_JPEGLIB_H -DHAVE_PNG_H -DHAVE_TIFF_H -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -DUSE_JPG -DUSE_PNG -DUSE_TIFF -o qr_wrap.o -c qr_wrap.cxx
qr_wrap.cxx: In function ‘VALUE SWIG_Ruby_NewPointerObj(void*, swig_type_info*, int)’:
qr_wrap.cxx:1306:43: error: ‘struct RString’ has no member named ‘ptr’
qr_wrap.cxx: In function ‘int SWIG_AsCharPtrAndSize(VALUE, char**, size_t*, int*)’:
qr_wrap.cxx:1616:30: error: ‘STR2CSTR’ was not declared in this scope
qr_wrap.cxx:1618:33: error: ‘struct RString’ has no member named ‘len’
make: *** [qr_wrap.o] Error 1
setup.rb:655:in `command': system("make") failed (RuntimeError)
from setup.rb:664:in `make'
from setup.rb:1258:in `setup_dir_ext'
from setup.rb:1532:in `block in traverse'
from setup.rb:1549:in `dive_into'
from setup.rb:1530:in `traverse'
from setup.rb:1534:in `block (2 levels) in traverse'
from setup.rb:1533:in `each'
from setup.rb:1533:in `block in traverse'
from setup.rb:1549:in `dive_into'
from setup.rb:1530:in `traverse'
from setup.rb:1524:in `block in exec_task_traverse'
from setup.rb:1519:in `each'
from setup.rb:1519:in `exec_task_traverse'
from setup.rb:1246:in `exec_setup'
from setup.rb:996:in `exec_setup'
from setup.rb:813:in `invoke'
from setup.rb:773:in `invoke'
from setup.rb:1578:in `<main>'
是否有任何libary或数据包未安装或我的环境出现问题?。
我的系统 Ubuntu 64bit 11/04
感谢您的帮助 Greez Bull
答案 0 :(得分:5)
rqr gem与Ruby 1.9不兼容。请改用 rqr19 gem。
如果您使用的是Bundler,请从以下位置更改Gemfile的rqr行:
gem 'rqr'
到
gem 'rqr19', :require => 'rqr'
答案 1 :(得分:0)
由于您使用的是linux,您是否按照RQR website上的说明预先安装了先决条件?
# 1. Install the prerequisites for Linux
sudo yum install libjpeg
sudo yum install libpng
sudo yum install libtiff
# 2. Then install the gem
sudo gem update --system
sudo gem install rqr
我希望这会有所帮助