hammackj / risu

Risu is Nessus parser, that converts the generated reports into a ActiveRecord database, this allows for easy report generation and vulnerability verification.
http://hammackj.github.io/risu
MIT License
63 stars 20 forks source link

Problem installing on Red hat #55

Closed wibbs closed 12 years ago

wibbs commented 12 years ago

Alright I know this is probably a ruby gems issue, but i was wondering if you could help me. I've been at this all day and i got it working on an ubuntu machine no problem, but it's killing me on red hat. I've uninstalled and re-installed ruby and gems. No luck. Thanks in advanced.

[root] # ruby -v ruby 1.9.3dev (2011-09-23 revision 33323) [x86_64-linux]

[root]# gem update --system Latest version currently installed. Aborting.

[root]# gem install risu Building native extensions. This could take a while... ERROR: Error installing risu: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb

checking for mysql_ssl_set()... * 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 --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/ruby --with-mysql-config --without-mysql-config /usr/local/lib/ruby/1.9.1/mkmf.rb:381:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/1.9.1/mkmf.rb:461:intry_link0' from /usr/local/lib/ruby/1.9.1/mkmf.rb:476:in try_link' from /usr/local/lib/ruby/1.9.1/mkmf.rb:619:intry_func' from /usr/local/lib/ruby/1.9.1/mkmf.rb:894:in block in have_func' from /usr/local/lib/ruby/1.9.1/mkmf.rb:790:inblock in checking_for' from /usr/local/lib/ruby/1.9.1/mkmf.rb:284:in block (2 levels) in postpone' from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:inopen' from /usr/local/lib/ruby/1.9.1/mkmf.rb:284:in block in postpone' from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:inopen' from /usr/local/lib/ruby/1.9.1/mkmf.rb:280:in postpone' from /usr/local/lib/ruby/1.9.1/mkmf.rb:789:inchecking_for' from /usr/local/lib/ruby/1.9.1/mkmf.rb:893:in have_func' from extconf.rb:50:in

'

Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/mysql-2.8.1 for inspection. Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

hammackj commented 12 years ago

Looks like the dev headers for the mysql client library are missing. Not sure what the package is in Redhat but, its like mysqlclient-dev in ubuntu.

I hope that helps, let me know if it doesn't.

wibbs commented 12 years ago

hmmm... I think that fixed half my errors. Now this is what i'm down to. Something with Magick perhaps? Thanks for your speedy response. gem install risu Building native extensions. This could take a while... Building native extensions. This could take a while... ERROR: Error installing risu: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb

checking for Ruby version >= 1.8.5... yes extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config. checking for gcc... yes checking for Magick-config... no Can't install RMagick 2.13.1. Can't find Magick-config in /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

* 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 --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/ruby

Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1 for inspection. Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

hammackj commented 12 years ago

That one is for the image magick library, same missing dev headers =P

wibbs commented 12 years ago

hmm... i've installed all the imagemagick. When i do a yum search imagemagick i get this ==============================N/S Matched: imagemagick =================================== ImageMagick-c++.x86_64 : ImageMagick Magick++ library (C++ bindings) GraphicsMagick.i686 : An ImageMagick fork, offering faster image generation and better quality GraphicsMagick.x86_64 : An ImageMagick fork, offering faster image generation and better quality ImageMagick.i686 : An X application for displaying and manipulating images ImageMagick.x86_64 : An X application for displaying and manipulating images php-magickwand.x86_64 : PHP API for ImageMagick php-pecl-imagick.x86_64 : Provides a wrapper to the ImageMagick library

I've installed all of the x86_64 stuff. Would the dev headers be called something else? I'll keep playing with it. PS I hate red hat

hammackj commented 12 years ago

There might be a libmagick-dev or something. I dont have a redhat box to test on. Is CentOS 6 equiv. to what you use?

wibbs commented 12 years ago

yeah. I believe it should be

wibbs commented 12 years ago

Alright. Finally got it. Red hat Enterprise 6 does not have the imagemagick-devel available in the repositories no matter what i did. Here are the steps i took to get this going just incase anyone else has the same problem

yum remove ImageMagick wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz tar -zxvf Imagemagick.tar.gz cd Imagemagick-6.7.6-8 ./configure; make; make install

Then i got the problem magickwand.h not found or w.e. So i did PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ gem install rmagick

lastly i had to install sqlite3 -devel yum install sqlite-devel.x86_64

gem install risu

PS#2- I still hate red hat

hammackj commented 12 years ago

Thanks for the notes. I am working on updating the install docs. I will include these notes.

Let me know if you have any other issues.

Also i notice you are using ruby 1.9.3 if the parsing seems really slow. Ie 5+ minutes try ruby 1.9.2. I am trying track down a bug in really slow parse times.

Sent from my Phone

On May 1, 2012, at 3:34 PM, wibbs reply@reply.github.com wrote:

Alright. Finally got it. Red hat Enterprise 6 does not have the imagemagick-devel available in the repositories no matter what i did. Here are the steps i took to get this going just incase anyone else has the same problem

yum remove ImageMagick wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz tar -zxvf Imagemagick.tar.gz cd Imagemagick-6.7.6-8 ./configure; make; make install

Then i got the problem magickwand.h not found or w.e. So i did PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ gem install rmagick

lastly i had to install sqlite3 -devel yum install sqlite-devel.x86_64

gem install risu

PS#2- I still hate red hat


Reply to this email directly or view it on GitHub: https://github.com/hammackj/risu/issues/55#issuecomment-5447403

wibbs commented 12 years ago

will do. That part I should be able to handle . haha. Again. thanks for all your help.