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

Failed to build gem native extension #1844

Open
imranniazikhan opened this issue Jun 19, 2024 · 2 comments
Open

Failed to build gem native extension #1844

imranniazikhan opened this issue Jun 19, 2024 · 2 comments

Comments

@imranniazikhan
Copy link

Before submitting an issue, please make sure you fully read any potential error messages output and did some research on your own.

Subject of the issue

Failed to build gem native extension

Your environment

  • Version of WPScan: Not installed yet due to error
  • Version of Ruby: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]
  • Operating System (OS): Ubuntu 22.04.4 LTS

Actual behavior

When i sudo gem install wpscan, it produce the following errors.

Tell us what happens instead.
root@imran-VB:~# gem install wpscan
Building native extensions. This could take a while...
ERROR: Error installing wpscan:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/3.0.0/gems/yajl-ruby-1.4.3/ext/yajl

/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240619-4753-2yzy62.rb extconf.rb
creating Makefile

current directory: /var/lib/gems/3.0.0/gems/yajl-ruby-1.4.3/ext/yajl
make DESTDIR= clean

current directory: /var/lib/gems/3.0.0/gems/yajl-ruby-1.4.3/ext/yajl
make DESTDIR=
compiling yajl.c
make: x86_64-linux-gnu-gcc: No such file or directory
make: *** [Makefile:245: yajl.o] Error 127

make failed, exit code 2

Gem files will remain installed in /var/lib/gems/3.0.0/gems/yajl-ruby-1.4.3 for inspection.
Results logged to /var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0/yajl-ruby-1.4.3/gem_make.out

PLEASE HELP ME

@c-hartmann
Copy link

on Linux (Ubuntu) installing package 'ruby-dev' solved the failing building process:

$ sudo apt install ruby-dev
$ sudo gem install wpscan

@markagonzales
Copy link

I had to install ruby-yajl from the package manager to get wpscan working. I'm not familiar with Ruby but this is what I ended up doing. Note that this was doing in an Ubuntu container.

root@698e516f4dfd:/# cat /etc/os-release | grep PRETTY
PRETTY_NAME="Ubuntu 24.04.1 LTS"
root@698e516f4dfd:/# apt install -y ruby-dev ruby-yajl curl
root@698e516f4dfd:/# ruby --version
ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [x86_64-linux-gnu]
root@fdf4c72a8900:/# wpscan --version | grep 'Current Version'
Current Version: 3.8.27

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

No branches or pull requests

3 participants