gem install metasploit-framework-db -v '4.11.0.pre.dev - ruby

Trying to install Metasploit Framework on OS X Maverick following this guide. I got to step 15, but while running bundle install the installer gets stuck on trying to install metasploit-framework -v '4.10.1.pre.dev' with the following error:
Errno::EACCES: Permission denied - metasploit-framework-db-4.11.0.pre.dev.gem
An error occurred while installing metasploit-framework-db (4.11.0.pre.dev), and
Bundler cannot continue.
Make sure that gem install metasploit-framework-db -v '4.11.0.pre.dev'
succeeds before bundling.
I know this exists, but cloning did not work for me. Running mfsupdate reads:
Using metasploit-framework-db 4.11.0.pre.dev from source at .
Tried to ran rvssudo bundle install --> ./msfconsole -->
Rails Error: Unable to access log file. Please ensure that /opt/msf/log/production.log exists and is chmod 0666.[*] Starting the Metasploit Framework console...[*] The initial module cache will be built in the background, this can take 2-5 minutes... /opt/msf/modules/payloads/singles/java/shell_reverse_tcp.rb:54:in initialize': No such file or directory - /opt/msf/data/java/metasploit/Payload.class (Errno::ENOENT)
Worried my AV Software might have caused some problems. Does anyone who has successfully installed the Metasploit Framework on OS X or Maverick have any ideas?
rvmsudo worked on mfsconsole, but this time the error reads: /opt/msf/modules/payloads/singles/java/shell_reverse_tcp.rb:54:in initialize: No such file or directory - /opt/msf/data/java/metasploit/Payload.class – aietsg Dec 31 '14 at 10:34
See below for more info

It looks as though that Gem needs more access than whatever context you are attempting the bundle install from. If you are using RVM like the blog post shows then you should try using "rvmsudo bundle install"

Related

Middleman command not found/ Bundler not working

I'm trying to install middleman. I installed the gem and can see it in my gem list. However, if I enter middleman -v I get the message middleman: command not found.
I tried installing bundler to run middleman with a Gemfile in the project directory using bundle exec middleman. But when I try to run bundle I get the following error:
bash: /usr/bin/bundle: /usr/bin/ruby: bad interpreter: No such file or directory
I'm running ruby v. 2.6 and installed middleman v.4.3.5 on Ubuntu 18.04.
Any help would be very much appreciated; I've wasted half a day trying to solve this and I'm still on high waters!
which ruby gives me /snap/bin/ruby and my path variable is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/share/rvm/bin. The problem is that ruby is in the snap folder.
I just uninstalled the ruby snap (and snaps in general) and installed "normal" Ruby, which had the correct path (usr/bin/ruby). The middleman installation then worked fine.

TheRubyRacer error while installing Beef in Windows 10 - 64 bit

I am trying to install Beef in a WIndows 10 - 64 bit PC.
I followed the instructions provided in the following link:
https://github.com/beefproject/beef/blob/master/INSTALL.txt
But I keep getting this error:
An error occurred while installing therubyracer (0.11.4), and Bundler
cannot continue. Make sure that gem install therubyracer -v '0.11.3'
succeeds before bundling.
I drilled down a bit & found that the installed version of therubyracer is 0.11.0beta1 x86-mingw32 whereas the installer is searching for version 0.11.3
In the link provided above, the following lines are mentioned in line 38:
Finally, edit beef's gem lock file by replacing the required ruby racer version with the version downloaded from the link above.
But when I do that I get this error:
Your lockfile is unreadable. Run rm Gemfile.lock and then bundle
install to generate a new lockfile.
Can anyone please help me out with this?
Doing what the error message suggests should do the trick. Just remove existing Gemfile.lock in beef project and then run bundle install command once again.
The Gemfile has the the following check:
# Windows support
if RUBY_PLATFORM.downcase.include?('mswin') || RUBY_PLATFORM.downcase.include?('mingw')
# make sure you install this gem following https://github.com/eakmotion/therubyracer_for_windows
gem 'therubyracer', '~> 0.11.0beta1'
elsif !RUBY_PLATFORM.downcase.include?('darwin')
gem 'therubyracer', '0.11.3'
end
So, it will generate a new Gemfile.lock file specific to Windows. The one in the repo is for Ubuntu/Debian.
Even after trying out the solution given by Uzbekjon, I wasn't able to get past the error. Beef requires a javascript runtime for the login page to properly show up. As suggested in the post given here, I got a workaround by installing Node.js

Trouble installing bropages on OSX

When I try to install bropages on Mavericks, I get:
$ gem install bropages
Building native extensions. This could take a while...
ERROR: Error installing bropages:
ERROR: Failed to build gem native extension.
No such file or directory # dir_chdir - /Users/christian/.gem/gems/unf_ext-0.0.6/ext/unf_ext
Gem files will remain installed in /Users/christian/.gem/gems/unf_ext-0.0.6 for inspection.
Results logged to /Users/christian/.gem/extensions/x86_64-darwin-13/2.2.0- static/unf_ext-0.0.6/gem_make.out
And then:
$ cat /Users/christian/.gem/extensions/x86_64-darwin-13/2.2.0-static/unf_ext-0.0.6/gem_make.out
No such file or directory # dir_chdir - /Users/christian/.gem/gems/unf_ext-0.0.6/ext/unf_ext
I'm using ruby 2.2.1 and gem 2.4.5, both managed with rbenv. Any idea what could cause this?
Have you tried it with sudo, I am running into the same issues as you, but my errors mentioned permissions, so I am going to go with sudo. It is strange, as I had it installed once before, and now it no longer seems to be there.
Make sure you've installed the Xcode Command Line Tools, which brings with it a bunch of utilities, including what you need to build a gem module.
xcode-select --install
After you've installed the package, give the install another go.
I guess you are using a .gemrc in your home directory, where you specify the gemhome. Instead of using a ~ for your home directory you should enter the complete path. In your example it should look as follow:
$ cat ~/.gemrc
gemhome: /Users/christian/.gem/
There must be some inconsistency between the ruby/gem tools. If you use a ~ in .gemrc, a subdirectory called /current/working/directory/~/.gem is created, while the extensions are put into your homes /home/user/.gem/ directory.

"Quick Install Gem" not working on RubyMine

I've just done a fresh install of RubyMine 4.5 in order to get a quickstart on Rails dev.
Whenever I try and install any Gem using the Tools > Quick Install Gem... command, I get the following error (below is specific to the flickraw gem)
Failed to Install Gems
Following gems were not installed:
flickraw(0.9.6): While executing gem ...
(Errno::EACCESS)
Permission denied - /Users/Andy/.rvm/gems/ruby-1.9.3-p194/cache/flickraw-0.9.6.gem
I guess I get that it's a permissions error...but why is it happening, shouldn't this just work? And how do I fix it?
I'm running this on the latest version of OSX Mountain Lion.
I've had similar problems before, it turned out to be caused by sudo being the owner of some gems installed in that rvm ruby installation I was using. I guess I installed something with sudo by accident, I dunno-- but go check in /Users/Andy/.rvm/gems/ruby-1.9.3-p194/cache and /Users/Andy/.rvm/gems/ruby-1.9.3-p194/gems and see if sudo owns cache/flickraw-0.9.6.gem or any folders in gems and if needed change the owner and group back to you ... I actually had so many messed up I opted to just remove and rebuild that ruby.

RubyGems installation errors both when using 'sudo' and not using sudo

I have a machine that is running Ubuntu Hardy, which provides its own RubyGems package. Unfortunately that version of RubyGems (1.1.1) is too old to do anything useful with, so I decided to manually update RubyGems to the current version (1.3.6). That part went smoothly, and if I do gem -v, I get 1.3.6 which is expected. The problem is when I try to do: sudo gem install rack, it returns this error:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /home/username/.gem
Usually when I install gems as root, it knows to install it into /usr/lib/ruby/gems, so why is it checking my home directory at all? Another quirk is when I do gem install rack (not as root), it says:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory.
which is where I want it to go. I've already tried clearing source_caches, trying different versions of RubyGems (1.3.5), forcing installation into /usr/lib with -i to no avail. Any ideas on why RubyGems is so insistent on checking my /home directory when installing as root?
Sounds like it could be a path issue coupled with having multiple versions installed.
Any difference in output between:
sudo gem env
and
gem env
Try running:
gem environment
and checking the values for the GEM PATH. More info at http://docs.rubygems.org/read/chapter/10#page31
I was running into the same problem myself on Fedora 15, so I ran 'gem install' with the '--backtrace' option to see what was going on.
It turned out it was failing at /usr/lib/ruby/site_ruby/1.8/rubygems/doc_manager.rb:203 where it tried to chdir to the directory it had previously stored (the home directory of the user I was running sudo as)
I didn't extensively debug to see what the underlying cause was, just rather used a quick workaround so I could continue moving forward. The workaround was simply to cd to the root directory, eg cd /, before running the gem install command.
Hope this helps / solves your issue.
Woulda been easier to su (password) then chmod 755 /usr/lib/ruby/gems/1.8

Resources