iagox86 / dnscat2

BSD 3-Clause "New" or "Revised" License
3.4k stars 599 forks source link

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

Open weujieytt opened 2 years ago

weujieytt commented 2 years ago

`/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 / 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:inblock 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:inmake' /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:inopen' /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:inblock 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:inbuild_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:ineach' /usr/lib/ruby/2.7.0/rubygems/ext/builder.rb:205:in build_extensions' /usr/lib/ruby/2.7.0/rubygems/installer.rb:844:inbuild_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:ininstall' /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:ininstall' /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:indo_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:incall' /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:ininstall_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:inblock 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:inlock' /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:ininstall' /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:inblock 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:ininstall' /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:ininvoke_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:indispatch' /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:instart' /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:inwith_friendly_errors' /var/lib/gems/2.7.0/gems/bundler-2.3.12/exe/bundle:36:in <top (required)>' /usr/local/bin/bundle:23:inload' /usr/local/bin/bundle:23:in `

'

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

In Gemfile: salsa20`

mfpx commented 2 years ago

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 commented 1 year ago

Please use the following commands:

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

zhnlyn commented 1 month ago

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