Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error #18

Open
svikram1707 opened this issue Jun 26, 2020 · 9 comments · May be fixed by #21
Open

Build Error #18

svikram1707 opened this issue Jun 26, 2020 · 9 comments · May be fixed by #21

Comments

@svikram1707
Copy link

! The 'trollop' gem has been deprecated and has been replaced by 'optimist'.
! See: https://rubygems.org/gems/optimist
! And: https://github.com/ManageIQ/optimist
Successfully installed trollop-2.9.10
Successfully installed mini_portile2-2.4.0
Building native extensions. This could take a while...
ERROR: Error installing gauntlt:
childprocess requires Ruby version >= 2.4.0.
Successfully installed nokogiri-1.10.9
Successfully installed rspec-support-3.9.3
Successfully installed diff-lcs-1.4.2
Successfully installed rspec-expectations-3.9.2
The command '/bin/sh -c gem install gauntlt --no-rdoc --no-ri' returned a non-zero code: 1
Makefile:4: recipe for target 'build' failed
make: *** [build] Error 1

@JoelMVanDyk
Copy link

I get pretty much the same, even though when I do:

"ruby -v"

I get:

ruby 2.7.1p83. (2020-03-31 revision a0c7c23c9c). [x86_linux]

@ELefebvre
Copy link

ELefebvre commented Jul 3, 2020

Hello @wickett , @karthequian
Same here... the cause is apt-get installing max Ruby 2.3.1 and dependencies requiring Ruby >= 2.4.0 after the latest fix.
@dehvCurtis, @JoelMVanDyk, @svikram1707
I managed to fix it for the purpose of the training but I'm not a coder so be careful. Here are the changes I made to dockerfile:
# Install Ruby and other OS stuff
RUN apt-get update && \
# added the row below to add a repo later
apt-get install -y software-properties-common && \
apt-get install -y build-essential \
bzip2 \
ca-certificates \
curl \
gcc \
git \
libcurl3 \
libcurl4-openssl-dev \
wget \
zlib1g-dev \
libfontconfig \
libxml2-dev \
libxslt1-dev \
make \
python-pip \
python2.7 \
python2.7-dev \
# ruby \
# ruby-dev \
# ruby-bundler && \
&& rm -rf /var/lib/apt/lists/*
RUN apt-add-repository ppa:brightbox/ruby-ng #added
RUN apt-get update #added
RUN apt-get install ruby2.4 ruby2.4-dev -y #added
RUN ruby --version #test if ruby version is right

# Install Gauntlt

RUN ruby -v #test if ruby version is right
RUN gem install rake
RUN gem install ffi -v 1.9.18
RUN apt-get upgrade -y #added because you get a request to upgrade
RUN gem install gauntlt --no-rdoc --no-ri

@dehvCurtis
Copy link

dehvCurtis commented Jul 16, 2020

same. Tried on both Ubuntu 18.04 and RHEL 8

Done installing documentation for ffi after 24 seconds
1 gem installed
db1512af6d6d9eb30e2357e20e971ee3655538dfa48cece018277859e51949b7
STEP 7: RUN gem install gauntlt --no-rdoc --no-ri
Fetching: trollop-2.9.10.gem (100%)
!    The 'trollop' gem has been deprecated and has been replaced by 'optimist'.
!    See: https://rubygems.org/gems/optimist
!    And: https://github.com/ManageIQ/optimist
Successfully installed trollop-2.9.10
Fetching: mini_portile2-2.4.0.gem (100%)
Successfully installed mini_portile2-2.4.0
Fetching: nokogiri-1.10.10.gem (100%)
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.10.10
Fetching: rspec-support-3.9.3.gem (100%)
Successfully installed rspec-support-3.9.3
Fetching: diff-lcs-1.4.4.gem (100%)
Successfully installed diff-lcs-1.4.4
Fetching: rspec-expectations-3.9.2.gem (100%)
Successfully installed rspec-expectations-3.9.2
Fetching: childprocess-4.0.0.gem (100%)
ERROR:  Error installing gauntlt:
	childprocess requires Ruby version >= 2.4.0.
Error: error building at STEP "RUN gem install gauntlt --no-rdoc --no-ri": error while running runtime: exit status 1
make: *** [Makefile:5: build] Error 125

@dehvCurtis
Copy link

Hello @wickett , @karthequian
Same here... the cause is apt-get installing max Ruby 2.3.1 and dependencies requiring Ruby >= 2.4.0 after the latest fix.
@dehvCurtis, @JoelMVanDyk, @svikram1707
I managed to fix it for the purpose of the training but I'm not a coder so be careful. Here are the changes I made to dockerfile:
# Install Ruby and other OS stuff
RUN apt-get update && \
# added the row below to add a repo later
apt-get install -y software-properties-common && \
apt-get install -y build-essential \
bzip2 \
ca-certificates \
curl \
gcc \
git \
libcurl3 \
libcurl4-openssl-dev \
wget \
zlib1g-dev \
libfontconfig \
libxml2-dev \
libxslt1-dev \
make \
python-pip \
python2.7 \
python2.7-dev \
# ruby \
# ruby-dev \
# ruby-bundler && \
&& rm -rf /var/lib/apt/lists/*
RUN apt-add-repository ppa:brightbox/ruby-ng #added
RUN apt-get update #added
RUN apt-get install ruby2.4 ruby2.4-dev -y #added
RUN ruby --version #test if ruby version is right

# Install Gauntlt

RUN ruby -v #test if ruby version is right
RUN gem install rake
RUN gem install ffi -v 1.9.18
RUN apt-get upgrade -y #added because you get a request to upgrade
RUN gem install gauntlt --no-rdoc --no-ri

thanks so much! I'll give it a try today.

@JoelMVanDyk
Copy link

So, got a lot farther, now down to step 14/30. But, it starts throwing errors again there at

RUN gem install ffi -v 1.9.18

says;

[91mERROR: Error installing ffi:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.4.0/gems/ffi-1.13.1/ext/ffi_c

I've also tried without the -v flag, with the same result.

Any help is appreciated...

@ELefebvre
Copy link

ELefebvre commented Sep 23, 2020 via email

@aorestr aorestr linked a pull request Nov 1, 2020 that will close this issue
@JoelMVanDyk
Copy link

This works, as long as I build on Ubuntu (18 or greater), not Fedora.

@hemtri1984
Copy link

So, got a lot farther, now down to step 14/30. But, it starts throwing errors again there at

RUN gem install ffi -v 1.9.18

says;

[91mERROR: Error installing ffi:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.4.0/gems/ffi-1.13.1/ext/ffi_c

I've also tried without the -v flag, with the same result.

Any help is appreciated...

I have done some changes into dockerfile:
FROM ubuntu:16.04
MAINTAINER [email protected]

ARG ARACHNI_VERSION=arachni-1.5.1-0.5.12

Install Ruby and other OS stuff

RUN apt-get update &&
apt-get install -y build-essential
bzip2
ca-certificates
curl
gcc
git
libcurl3
libcurl4-openssl-dev
wget
zlib1g-dev
libfontconfig
libxml2-dev
libxslt1-dev
make
python-pip
python2.7
python2.7-dev
#ruby
#ruby-dev
#ruby-bundler &&
&& rm -rf /var/lib/apt/lists/*

RUN apt-get update
RUN apt-get -y install software-properties-common
RUN apt-add-repository ppa:brightbox/ruby-ng #added
RUN apt-get update #added
RUN apt-get install ruby2.7 ruby2.7-dev -y #added
RUN ruby --version #test if ruby version is right

Install Gauntlt

RUN ruby -v #test if ruby version is right
RUN gem install rake
RUN gem install ffi -v 1.9.18
RUN gem install rake
RUN gem install gauntlt --no-document

Install Attack tools

WORKDIR /opt

arachni

RUN wget https://github.com/Arachni/arachni/releases/download/v1.5.1/${ARACHNI_VERSION}-linux-x86_64.tar.gz &&
tar xzvf ${ARACHNI_VERSION}-linux-x86_64.tar.gz > /dev/null &&
mv ${ARACHNI_VERSION} /usr/local &&
ln -s /usr/local/${ARACHNI_VERSION}/bin/* /usr/local/bin/

Nikto

RUN apt-get update &&
apt-get install -y libtimedate-perl
libnet-ssleay-perl &&
rm -rf /var/lib/apt/lists/*

RUN git clone --depth=1 https://github.com/sullo/nikto.git &&
cd nikto/program &&
rm -rf /var/lib/apt/lists/*

RUN git clone --depth=1 https://github.com/sullo/nikto.git &&
cd nikto/program &&
echo "EXECDIR=/opt/nikto/program" >> nikto.conf &&
ln -s /opt/nikto/program/nikto.conf /etc/nikto.conf &&
chmod +x nikto.pl &&
ln -s /opt/nikto/program/nikto.pl /usr/local/bin/nikto

sqlmap

WORKDIR /opt
ENV SQLMAP_PATH /opt/sqlmap/sqlmap.py
RUN git clone --depth=1 https://github.com/sqlmapproject/sqlmap.git

dirb

COPY vendor/dirb222.tar.gz dirb222.tar.gz

RUN tar xvfz dirb222.tar.gz > /dev/null &&
cd dirb222 &&
chmod 755 ./configure &&
./configure &&
make &&
ln -s /opt/dirb222/dirb /usr/local/bin/dirb

ENV DIRB_WORDLISTS /opt/dirb222/wordlists

nmap

RUN apt-get update &&
apt-get install -y nmap &&
rm -rf /var/lib/apt/lists/*

sslyz

RUN python --version
RUN pip --version
RUN pip install sslyze==1.3.4
ENV SSLYZE_PATH /usr/local/bin/sslyze

ENTRYPOINT [ "/usr/local/bin/gauntlt" ]

Working correctly till step 28. But now showing error on step 29: RUN pip install sslyze==1.3.4.

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-MqvKce/cryptography/
You are using pip version 8.1.1, however version 21.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The command '/bin/sh -c pip install sslyze==1.3.4' returned a non-zero code: 1

@dehvCurtis
Copy link

i was able to resolve all of these issues. The code is on my other phone. Will update soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants