Pages

Problem with installation of gem mechanize nokogiri rfeedparser

Thursday, August 20, 2009 Posted by Shrikant Lokhande
If the issue is with installtion of :
gem install mechanize


Following package needs:
yum install expat
yum install libexpat
yum install libxml2-devel
yum install libxml
yum install libxml-devel
yum install libxslt libxslt-dev
yum install libxslt-devel

cd /usr/local/lib/ruby/gems/1.8/gems/nokogiri-1.3.3
ruby ext/nokogiri/extconf.rb
make
make install

Or just do "gem install mechanize"

----------------------------------------------------------------------
gem install rfeedparser

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

/usr/local/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile

make
gcc -I. -I/usr/local/include/ruby-1.9.1/i686-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -O2 -g -Wall -Wno-parentheses -o hpricot_scan.o -c hpricot_scan.c
ext/hpricot_scan/hpricot_scan.rl: In function ‘hpricot_scan’:
ext/hpricot_scan/hpricot_scan.rl:172: error: ‘struct RString’ has no member named ‘ptr’
ext/hpricot_scan/hpricot_scan.rl:185: error: ‘struct RString’ has no member named ‘ptr’
ext/hpricot_scan/hpricot_scan.rl:185: error: ‘struct RString’ has no member named ‘len’
ext/hpricot_scan/hpricot_scan.rl:186: error: ‘struct RString’ has no member named ‘len’
ext/hpricot_scan/hpricot_scan.rl:202: error: ‘struct RString’ has no member named ‘ptr’
make: *** [hpricot_scan.o] Error 1


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/hpricot-0.6 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/hpricot-0.6/ext/hpricot_scan/gem_make.out

Resolution:
Need Above all yum packages installed.

http://www.yoshidam.net/xmlparser-0.6.8.tar.gz
cd xmlparser/
ruby extconf.rb
checking for expat.h... yes
checking for XML_ParserCreate() in -lexpat... yes
checking for XML_SetNotStandaloneHandler()... yes
checking for XML_SetParamEntityParsing()... yes
checking for XML_SetDoctypeDeclHandler()... yes
checking for XML_ParserReset()... yes
checking for XML_SetSkippedEntityHandler()... yes
checking for XML_GetFeatureList()... yes
checking for XML_UseForeignDTD()... yes
checking for XML_GetIdAttributeIndex()... yes
checking for ntohl() in -lsocket... no
creating Makefile

make && make install

root@localhost xmlparser]# gem install rfeedparser
Successfully installed rfeedparser-0.9.951
1 gem installed
[root@localhost xmlparser]#

rock na.! if any issue, write to lokahnde.shrikant@gmail.com
Labels:

Post a Comment