Installation Issue

Hello.

I followed the install instructions for Kali:
git clone https://github.com/dradis/dradis-ce.git cd dradis-ce/

When I run the ./bin/setup I get an error.
“Following files may not be writable so sudo is needed:”
/usr/local/bin
/var/lib/gems2.5.0
(a few others)

“Your Ruby version is 2.5.7, but your gemfile specified is 2.4.1”

I’ve looked through the forums but don’t see anything specific to this error. I’ve tried re-installing and updating bundler. When I install with sudo, I get a message to not install bundler as root.

Hi @CybertSys. Thanks for reaching out!

“Following files may not be writable so sudo is needed:”

What are the permissions for the folders referenced in the output? If they’re not writable, changing the permissions should resolve this one.

“Your Ruby version is 2.5.7, but your gemfile specified is 2.4.1”

Are you using rbenv or something like that? You may need to install Ruby v2.4.1 before you can switch versions.

Disclaimer: I’m not too familiar with Linux…yet

I mucked things up pretty good trying to install the correct version of Ruby, rbenv, etc. So, I re-installed the OS. I was able to install rbenv. I’m still getting the same error. Please see below and also my screen capture.

(I know I have the permissions wide open right now)
You can see, I have installed the correct version of Ruby, 2.4.1 and also that version 2.5.7 isn’t even installed? Why are things so challenging in Linux? So far I have about 6 hours in this. Thanks for your help @rachkor

kali@kali:~ cd dradis-ce/ kali@kali:~/dradis-ce ./bin/setup

== Enabling default add-ons ==
== Installing dependencies ==
./bin/setup:9: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
Your Ruby version is 2.5.7, but your Gemfile specified 2.4.1
Your Ruby version is 2.5.7, but your Gemfile specified 2.4.1

== Command [“bundle install”] failed ==
kali@kali:~/dradis-ce$ cd …
kali@kali:~ rbenv install 2.4.1 rbenv: /home/kali/.rbenv/versions/2.4.1 already exists continue with installation? (y/N) n kali@kali:~ rbenv global 2.4.1
kali@kali:~ rbenv prefix 2.5.7 rbenv: version `2.5.7' not installed kali@kali:~

Edit the Gemfile and at the top you will see it call 2.4.1. . Change version to 2.5.7
Next you’ll have more problems to solve till you find the nokogumbo issue.

DOWNLOAD LATEST KALI:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install dradis
sudo dradis

Dradis perhaps should be mentioning this themselves now…

You’re good to go.
Compliments of F1uffyGoat

@F1uffy & @CybertSys, the version of Ruby needs to be v2.4.1 in order for Dradis to run properly. I’d recommend installing something like RVM to help you manage multiple Ruby versions. Here’s a pretty good tutorial to get RVM installed and Ruby v2.4.1 running with more explanation: https://medium.com/the-andela-way/ruby-versioning-with-ruby-version-manager-rvm-6a3198b263df. Also, we definitely recommend using the git install method on Kali: https://dradisframework.com/ce/documentation/install_kali.html

You can see, I have installed the correct version of Ruby, 2.4.1 and also that version 2.5.7 isn’t even installed? Why are things so challenging in Linux? So far I have about 6 hours in this. Thanks for your help @rachkor

What’s the output when you run the following?

rbenv versions
rbenv version

That should list both what versions are installed and also what version is currently being used. Local dependency errors are the worst and I wish I could remove them! But, we will get this sorted out.

Draidis now ships in the latest Kali.

Simply apt-get install draidis.

No need to mess around with git. I’d recommend anyone using Kali specifically NOT to use git as there are endless problems.

To save people time I’d suggest perhaps mentioning how easy it is to set this up on Kali apt-get install draidis on your instructions for installing Kali. Instead of telling people to install it within 2 minutes your instructions took me two days.

@F1uffy, thanks for the update! I’m glad you’re up and running. We’re still recommending the git install as it allows you to stay up to date with the latest Dradis updates. Our development team is pushing new changes often. I was able to replicate the Ruby version issues you mentioned on a fresh Kali install but a rbenv version change did the trick. I did have to do the following to get the changes to apply:

vi /home/kali/.zshenv

and added:

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

After quitting the terminal and restarting, the following commands finally matched:

ruby -v
rbenv global

And once both of those listed 2.4.1, the ./bin/setup proceeded as expected. Just wanted to leave this here for the next person!

1 Like

Thanks, I’ll try that. I ended up going the apt-install route and it worked for me as well.

I was in the same boat as F1uffy and CybertSys. I worked on making this work for two days. I got it working with Kali so I will outline the steps I used. I think this easier than trying to make it work in CentOS. Follow these steps and pay attention to any extra items you may be prompted for along the way. For me, the most important step was installing RVM and setting the correct version of Ruby that matched the Gemfile version that Dradis is using. (2.4.1)

  1. Install Kali Linux 2020.2 Release as a VM in VMware workstation.

  2. Follow the instructions on this page. https://dradisframework.com/ce/documentation/install_kali.html

  3. Install RVM by following the instructions here. https://rvm.io/rvm/install. For reference have a look at https://medium.com/the-andela-way/ruby-versioning-with-ruby-version-manager-rvm-6a3198b263df. Make sure you install the correct version of Ruby (2.4.1)

  4. Now you are ready to follow the instructions located here. https://dradisframework.com/ce/documentation/install_git.html

1 Like