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

An error occurred while installing salsa20 (0.1.1), and Bundler cannot continue. #173

Open
weujieytt opened this issue Apr 22, 2022 · 3 comments

Comments

@weujieytt
Copy link

weujieytt commented Apr 22, 2022

`/dnscat2/server$ bundle install
Fetching gem metadata from https://rubygems.org/.......
Using bundler 2.3.12
Using ecdsa 1.2.0
Following files may not be writable, so sudo is needed:
/usr/local/bin
/var/lib/gems/2.7.0
/var/lib/gems/2.7.0/build_info
/var/lib/gems/2.7.0/cache
/var/lib/gems/2.7.0/doc
/var/lib/gems/2.7.0/extensions
/var/lib/gems/2.7.0/gems
/var/lib/gems/2.7.0/specifications
Fetching salsa20 0.1.1

Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:

  bundle config set --local path 'vendor/bundle'
  bundle install

to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to RubyGems using sudo.

Password:
Installing salsa20 0.1.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/bundler20220422-100355-megcphsalsa20-0.1.1/gems/salsa20-0.1.1/ext/salsa20_ext

/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20220422-100355-1aqtmp9.rb extconf.rb
creating Makefile

current directory: /tmp/bundler20220422-100355-megcphsalsa20-0.1.1/gems/salsa20-0.1.1/ext/salsa20_ext
make "DESTDIR=" clean

current directory: /tmp/bundler20220422-100355-megcphsalsa20-0.1.1/gems/salsa20-0.1.1/ext/salsa20_ext
make "DESTDIR="
compiling salsa20.c
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/syslimits.h:7,
from /usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h:34,
from ecrypt-config.h:66,
from ecrypt-portable.h:23,
from ecrypt-sync.h:13,
from salsa20.c:7:
/usr/lib/gcc/x86_64-linux-gnu/9/include/limits.h:194:15: fatal error: limits.h: No such file or directory
194 | #include_next <limits.h> /* recurse down to the real one */
| ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:245: salsa20.o] Error 1

make failed, exit code 2

Gem files will remain installed in /tmp/bundler20220422-100355-megcphsalsa20-0.1.1/gems/salsa20-0.1.1 for inspection.
Results logged to /tmp/bundler20220422-100355-megcphsalsa20-0.1.1/extensions/x86_64-linux/2.7.0/salsa20-0.1.1/gem_make.out

/usr/lib/ruby/2.7.0/rubygems/ext/builder.rb:97:in run' /usr/lib/ruby/2.7.0/rubygems/ext/builder.rb:51:in block in make'
/usr/lib/ruby/2.7.0/rubygems/ext/builder.rb:43:in each' /usr/lib/ruby/2.7.0/rubygems/ext/builder.rb:43:in make'
/usr/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:63:in block in build' /usr/lib/ruby/2.7.0/tempfile.rb:291:in open'
/usr/lib/ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:30:in build' /usr/lib/ruby/2.7.0/rubygems/ext/builder.rb:167:in block in build_extension'
/usr/lib/ruby/2.7.0/rubygems/ext/builder.rb:163:in synchronize' /usr/lib/ruby/2.7.0/rubygems/ext/builder.rb:163:in build_extension'
/usr/lib/ruby/2.7.0/rubygems/ext/builder.rb:208:in block in build_extensions' /usr/lib/ruby/2.7.0/rubygems/ext/builder.rb:205:in each'
/usr/lib/ruby/2.7.0/rubygems/ext/builder.rb:205:in build_extensions' /usr/lib/ruby/2.7.0/rubygems/installer.rb:844:in build_extensions'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/rubygems_gem_installer.rb:71:in build_extensions' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/rubygems_gem_installer.rb:28:in install'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/source/rubygems.rb:204:in install' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/installer/gem_installer.rb:54:in install'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/installer/gem_installer.rb:16:in install_from_spec' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/installer/parallel_installer.rb:186:in do_install'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/installer/parallel_installer.rb:171:in install_serially' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/installer/parallel_installer.rb:97:in call'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/installer/parallel_installer.rb:71:in call' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/installer.rb:259:in install_in_parallel'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/installer.rb:209:in install' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/installer.rb:89:in block in run'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/process_lock.rb:19:in rescue in lock' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/process_lock.rb:15:in lock'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/installer.rb:71:in run' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/installer.rb:23:in install'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/cli/install.rb:62:in run' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/cli.rb:255:in block in install'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/settings.rb:131:in temporary' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/cli.rb:254:in install'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/cli.rb:31:in dispatch'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/cli.rb:25:in start'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/exe/bundle:48:in block in <top (required)>' /var/lib/gems/2.7.0/gems/bundler-2.3.12/lib/bundler/friendly_errors.rb:103:in with_friendly_errors'
/var/lib/gems/2.7.0/gems/bundler-2.3.12/exe/bundle:36:in <top (required)>' /usr/local/bin/bundle:23:in load'
/usr/local/bin/bundle:23:in `

'

An error occurred while installing salsa20 (0.1.1), and Bundler cannot continue.

In Gemfile:
salsa20`

@mfpx
Copy link

mfpx commented Jun 21, 2022

Ditto, there appears to be a dependency issue of some sort
What helped me was to install those dependencies directly. I've had an issue with salsa20 and sha3, so realistically just try gem install salsa20 and then if you encounter more issues, just try gem install X where X is the dependency that's failing.
Make sure you have your distro's equivalent of build-essential on Debian (and derivs).

@justlife4x4
Copy link

Please use the following commands:

  • sudo apt-get install ruby-dev
  • sudo gem install bundler
  • bundle install

For me it solved the issue. Feel free to reach out!

@zhnlyn
Copy link

zhnlyn commented Jul 26, 2024

For WSL I used the following :
sudo apt install build-essential
Install the gems causing the issues individually "gem install -v

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

4 participants