CentOS 7 - Installation Dradic-ce

Hi all,

I trying to install Dradis on CentOS 7 system.

I have an error with nokogiri :

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb checking if the C compiler accepts ... yes Building nokogiri using packaged libraries. checking for iconv... yes IMPORTANT NOTICE: Buidling Nokogiri with a packaged version of libxml2-2.9.2 with the following patches applied: - 0001-Revert-Missing-initialization-for-the-catalog-module.patch - 0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch Team Nokogiri will keep on doing their best to provide security updates in a timely manner, but if this is a concern for you and want to use the system library instead; abort this installation process and reinstall nokogiri as follows: gem install nokogiri -- --use-system-libraries [--with-xml2-config=/path/to/xml2-config] [--with-xslt-config=/path/to/xslt-config] If you are using Bundler, tell it to use the option: bundle config build.nokogiri --use-system-libraries bundle install Note, however, that nokogiri is not fully compatible with arbitrary versions of libxml2 provided by OS/package vendors. Extracting libxml2-2.9.2.tar.gz into tmp/x86_64-redhat-linux-gnu/ports/libxml2/2.9.2... OK Running patch with /usr/local/share/gems/gems/nokogiri-1.6.5/ports/patches/libxml2/0001-Revert-Missing-initialization-for-the-catalog-module.patch... Running 'patch' for libxml2 2.9.2... ERROR, review '/usr/local/share/gems/gems/nokogiri-1.6.5/ext/nokogiri/tmp/x86_64-redhat-linux-gnu/ports/libxml2/2.9.2/patch.log' to see what happened. *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary

Gem files will remain installed in /usr/local/share/gems/gems/nokogiri-1.6.5 for inspection. Results logged to /usr/local/share/gems/gems/nokogiri-1.6.5/ext/nokogiri/gem_make.out An error occurred while installing nokogiri (1.6.5), and Bundler cannot continue. Make sure that gem install nokogiri -v '1.6.5’succeeds before bundling.

I list the installed gem and I have nokogiri but not in good version to Dradis :

nokogiri (1.6.7.2, 1.6.1)

I try with bundle config and bundle install :

bundle config build.nokogiri --use-system-libraries bundle install

=>

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb --use-system-libraries checking if the C compiler accepts ... yes Building nokogiri using system libraries. libxml2 version 2.6.21 or later is required! *** 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.

Gem files will remain installed in /usr/local/share/gems/gems/nokogiri-1.6.5 for inspection. Results logged to /usr/local/share/gems/gems/nokogiri-1.6.5/ext/nokogiri/gem_make.out An error occurred while installing nokogiri (1.6.5), and Bundler cannot continue. Make sure that gem install nokogiri -v ‘1.6.5’ succeeds before bundling.

I go to see mkmf.log :

package configuration for libxml-2.0 is not found package configuration for libxslt is not found package configuration for libexslt is not found "gcc -E -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC -g -DXP_UNIX -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline conftest.c -o conftest.i" conftest.c:3:31: erreur fatale: libxml/xmlversion.h : Aucun fichier ou dossier de ce type #include <libxml/xmlversion.h>

But I have already installed :

libxslt-1.1.28-5.el7.x86_64
libxml2-2.9.1-6.el7_2.2.x86_64

And libexslt not exist in repo (base repo or EPEL).

On the last try install, “/usr/bin/ruby extconf.rb --use-system-libraries”

/usr/bin/ruby /usr/local/share/gems/gems/nokogiri-1.6.5/ext/nokogiri/extconf.rb --use-system-libraries checking if the C compiler accepts ... yes Building nokogiri using system libraries. libxml2 version 2.6.21 or later is required! *** /usr/local/share/gems/gems/nokogiri-1.6.5/ext/nokogiri/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.

I search with find XML librairies on the server :

/usr/lib64/libxml2.so.2 /usr/lib64/libxml2.so.2.9.1

Someone can help me ?

Thanks !

If I take dradis-3.1.0.rc2-linux-x86_64.tar.gz and I do ./dradis-webapp && ./dradis-worker

I have :

/dradis/lib/vendor/ruby/2.2.0/gems/execjs-2.6.0/lib/execjs/runtimes.rb:48:in autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from /dradis/lib/vendor/ruby/2.2.0/gems/execjs-2.6.0/lib/execjs.rb:5:in module:ExecJS
from /dradis/lib/vendor/ruby/2.2.0/gems/execjs-2.6.0/lib/execjs.rb:4:in <top (required)>' from /dradis/lib/vendor/ruby/2.2.0/gems/uglifier-2.7.2/lib/uglifier.rb:3:in require’
from /dradis/lib/vendor/ruby/2.2.0/gems/uglifier-2.7.2/lib/uglifier.rb:3:in <top (required)>' from /dradis/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:76:in require’
from /dradis/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:76:in block (2 levels) in require' from /dradis/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in each’
from /dradis/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in block in require' from /dradis/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in each’
from /dradis/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in require' from /dradis/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler.rb:134:in require’
from /dradis/lib/app/config/application.rb:12:in <top (required)>' from /dradis/lib/vendor/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:78:in require’
from /dradis/lib/vendor/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:78:in block in server' from /dradis/lib/vendor/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:75:in tap’
from /dradis/lib/vendor/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:75:in server' from /dradis/lib/vendor/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:39:in run_command!’
from /dradis/lib/vendor/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands.rb:17:in <top (required)>' from /dradis/lib/app/bin/rails:4:in require’
from /dradis/lib/app/bin/rails:4:in `’

Gem execjs is installed :frowning:

It’s OK, I installed Nodejs.

You can close this topic.

@trasla are you installing with the instructions here? Installing Dradis from Git | Dradis Framework
Video instructions here: Installing Dradis from Git - Community Edition Videos - Dradis Framework

It looks like you’re running into a system-specific error with nokogiri. Can you try running the gem install again but with the paths to libxslt and libxml2 specified? Example:

gem install nokogiri -v '1.6.5' -- --use-system-libraries --with-xml2-config=/path/to/xml2-config --with-xslt-config=/path/to/xslt-config

If you run into issues getting this installed, can you try searching StackOverflow for ideas? There are a lot of workarounds to get nokogiri installed depending on your local environment.