要求'RMagick'引发错误'未定义的符号:XStringListToTextProperty'

时间:2014-10-11 08:53:28

标签: ruby imagemagick rmagick

我有:

  • Ubuntu 10.04.4 LTS
  • ruby​​ 1.9.1
  • ImageMagick 6.8.6-5
  • RMagick 2.13.2

当我尝试在require 'RMagick'irb时,我遇到了错误:

LoadError: /usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2/lib/RMagick2.so: undefined symbol: XStringListToTextProperty - /usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2/lib/RMagick2.so
from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.13.2/lib/RMagick.rb:11:in `<top (required)>'
from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from (irb):1
from /usr/local/bin/irb:12:in `<main>'

1 个答案:

答案 0 :(得分:0)

解决方案很简单:只需完全删除imagemagick

相反apt-get remove imagemagick使用后续步骤:

wget imagemagick.org/download/ImageMagick.tar.gz
tar zxvf ImageMagick.tar.gz
cd ImageMagick-6.8.2-10
./configure
make uninstall