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

Install fails on BackTrack5 #43

Closed ebdavison closed 13 years ago

ebdavison commented 13 years ago

Trying to install risu on BackTrack5. Followed the wiki for Ubuntu 10 and installed the prerequesite packages. I also did a gem update and now gem install risu produces:

gem install risu

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

/usr/bin/ruby1.9.2 extconf.rb checking for Ruby version >= 1.8.5... yes checking for gcc... yes checking for Magick-config... yes checking for ImageMagick version >= 6.4.9... yes checking for HDRI disabled version of ImageMagick... yes checking for stdint.h... * 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/bin/ruby1.9.2 /usr/lib/ruby/1.9.2/mkmf.rb:368:in try_do': The complier failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/lib/ruby/1.9.2/mkmf.rb:452:intry_cpp' from /usr/lib/ruby/1.9.2/mkmf.rb:834:in block in have_header' from /usr/lib/ruby/1.9.2/mkmf.rb:693:inblock in checking_for' from /usr/lib/ruby/1.9.2/mkmf.rb:280:in block (2 levels) in postpone' from /usr/lib/ruby/1.9.2/mkmf.rb:254:inopen' from /usr/lib/ruby/1.9.2/mkmf.rb:280:in block in postpone' from /usr/lib/ruby/1.9.2/mkmf.rb:254:inopen' from /usr/lib/ruby/1.9.2/mkmf.rb:276:in postpone' from /usr/lib/ruby/1.9.2/mkmf.rb:692:inchecking_for' from /usr/lib/ruby/1.9.2/mkmf.rb:833:in have_header' from extconf.rb:193:in

'

Gem files will remain installed in /var/lib/gems/1.9.2/gems/rmagick-2.13.1 for inspection. Results logged to /var/lib/gems/1.9.2/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

hammackj commented 13 years ago

You ran this command?

sudo apt-get install ruby1.8-dev libzip1 libzip-dev libxml2-dev libxml2 libmysqlclient-dev imagemagick libmagickcore2 libmagickwand-dev libmagickcore-dev libmagick9-dev

hammackj commented 13 years ago

Here are detailed instructions: http://hammackj.com/2011/06/09/installing-risu-on-backtrack5/ that I used to set it up on Backtrack5.

ebdavison commented 13 years ago

I followed the commands from https://github.com/hammackj/risu/wiki/Known-Installation-Issues and then got that error. i am going through the wiki entry you referenced and using rvm. I will update you on the results as soon as I get far enough.

ebdavison commented 13 years ago

BTW, why the name change from nessusdb to risu?

ebdavison commented 13 years ago

I get the same error when I do 'gem install risu':

/usr/bin/ruby1.9.2 extconf.rb checking for Ruby version >= 1.8.5... yes checking for gcc... yes checking for Magick-config... yes checking for ImageMagick version >= 6.4.9... yes checking for HDRI disabled version of ImageMagick... yes checking for stdint.h... * 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.

ebdavison commented 13 years ago

I did also notice that 'gem -v' returns 1.3.7, not 1.6.2 like your blog post shows.

hammackj commented 13 years ago

gem update --system, will update the version of ruby gems. Please let me know if that doesn't work.

The name was change due to Tenable legal and a trademark over the Nessus name.

ebdavison commented 13 years ago

ERROR: While executing gem ... (RuntimeError) gem update --system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get.

Understood on the name change. Surprised me to not be able to find this project at first.

ebdavison commented 13 years ago

Looks like it is a problem is libuuid.so.1 library:

ld /usr/lib/libSM.so ld: warning: cannot find entry symbol _start; not setting start address /usr/lib/libSM.so: undefined reference to uuid_unparse_lower@UUID_1.0' /usr/lib/libSM.so: undefined reference touuid_generate@UUID_1.0'

And further:

ldd libSM.so ./libSM.so: /opt/rapid7/nexpose/nsc/nxpgsql/pgsql/lib/libuuid.so.1: no version information available (required by ./libSM.so) linux-gate.so.1 => (0xb77b0000) libICE.so.6 => /usr/lib/libICE.so.6 (0xb7779000) libuuid.so.1 => /opt/rapid7/nexpose/nsc/nxpgsql/pgsql/lib/libuuid.so.1 (0xb7775000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb761a000) /lib/ld-linux.so.2 (0xb77b1000)

Looks like i need to resolve this nexpose issue !@$#$%@!#.

ebdavison commented 13 years ago

Well, if I at least temporarily remove the nexpose library from the path I get a different error:

gem install risu Building native extensions. This could take a while... ERROR: Error installing risu: risu requires RubyGems version >= 1.6.0. Try 'gem update --system' to update RubyGems itself.

I am going to try to update rubygems with rvm.

hammackj commented 13 years ago

Try updating to a newer version of rubygems, there was a issue using an older version and I had to upgrade the min req version.

ebdavison commented 13 years ago

Nope:

root@bt:/usr/lib# /usr/local/rvm/bin/rvm rubygems latest Removing old Rubygems files... Installing rubygems-1.8.10 for ruby-1.9.2-p290 ... Installation of rubygems completed successfully. root@bt:/usr/lib# gem1.9.2 -v 1.3.7 root@bt:/usr/lib# gem1.8 -v 1.3.7 root@bt:/usr/lib# gem -v 1.3.7

ebdavison commented 13 years ago

Now I've broken it entirely ...

root@bt:/usr/lib# gem update /usr/local/lib/site_ruby/1.9.2/rubygems/gem_runner.rb:86:in <top (required)>': undefined methodload_plugins' for Gem:Module (NoMethodError) from /usr/bin/gem:9:in require' from /usr/bin/gem:9:in

'


Managed to fix this but gems is still at 1.3.7.

ebdavison commented 13 years ago

How did you get your gem to version 1.6.2? When I install rubygems 1.8.7 with rvm I still end up with gem version 1.3.7.

rige78 commented 13 years ago

got risu installed by doing: root@bt:/usr/lib# rvm rubygems latest

thus getting gem-ruby-1.9.2-p290. This one returns: root@bt:/usr/lib# gem-ruby-1.9.2-p290 -v 1.8.10

then you can

root@bt:/usr/lib# gem-ruby-1.9.2-p290 install risu Successfully installed risu-1.4.8 1 gem installed Installing ri documentation for risu-1.4.8... Installing RDoc documentation for risu-1.4.8...

ebdavison commented 13 years ago

Bingo! That did it. I do not have gem-ruby-1.9.2-p290 in the path anywhere any my rvm is in /usr/local/rvm/bin which is also not in the path. I can fix that part. But, using the path from rvm to gem-ruby-1.9.2-p290 worked and risu is now installed.

Thanks.