I want to install only Ruby, not Ruby on Rails, I check this command:
sudo apt-get install ruby-full -g
But the terminal report me this error:
E:Command line option 'g' [from -g] is not known
This command will install the latest stable Ruby version and will make it
available globally (through the '-g' parameter) on your system environment...
Why do I get this error?
Update your package manager first:
sudo apt-get update
This must finish without error or the following step will fail.
Install curl:
sudo apt-get install curl
You’ll use curl for installing RVM.
Install RVM
curl -L https://get.rvm.io | bash -s stable --ruby
You Already Have RVM Installed
If you already have RVM installed, update it to the latest version and install Ruby:
rvm get stable --autolibs=enable
Install Ruby:
rvm install ruby
apt-get install ruby-full
apt (Debian or Ubuntu)
Debian GNU / Linux and Ubuntu use the apt package manager. You can use it as follows:
font: https://www.ruby-lang.org/pt/documentation/installation/
-g is not an option of apt-get. There is nothing like "global" install in apt-get. Everything is installed globally. If you want to install the ruby-full package, just do
sudo apt-get install ruby-full
Another option is to install ruby via rvm.io or rbenv
Related
Firstly i installed wpscan on ubuntu by following these methods
apt-get install git
sudo apt-get install libcurl4-openssl-dev libxml2 libxml2-dev libxslt1-dev ruby-dev build-essential libgmp-dev zlib1g-dev
git clone https://github.com/wpscanteam/wpscan.git
cd wpscan
sudo gem install bundler && bundle install --without test development
Then when i run it by typing ruby wpscan.rb
it said
Could not find ffi-1.9.18 in any of the sources
Run `bundle install` to install missing gems.
when i run bundle install i got that output
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.4.0/gems/ffi-1.9.18 for
inspection.
Results logged to
/var/lib/gems/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.9.18/gem_make.out
An error occurred while installing ffi (1.9.18), and Bundler cannot
continue.
Make sure that `gem install ffi -v '1.9.18'` succeeds before bundling.
In Gemfile:
typhoeus was resolved to 1.3.0, which depends on
ethon was resolved to 0.10.1, which depends on
Help will be appreciated , thanks
INSTALL RMV
Pre-requisites
sudo apt-get install software-properties-common
Add the PPA and install the package
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
sudo usermod -a -G rvm $USER
Change your terminal window
At terminal window, click Edit > Profile Preferences, click on Title and Command tab and check Run command as login shell.
Edit Profile
3.Reboot
A lot of changes were made (scripts that needs to be reloaded, you're now member of rvm group) and in order to properly get all them working, you need to reboot (in most cases a logout/login is enough, but in some Ubuntu derivatives or some terminal emulators, a shell login is not performed, so we advise to reboot).
Enable local gemsets
Now enable local gemsets. Open a terminal (Ctrl+Alt+T) and run:
rvm user gemsets
Install a ruby
Now you're ready to install rubies. Open a terminal (Ctrl+Alt+T) and run:
rvm install ruby
RVM Usage
man rvm
INSTALL - WPSCAN
From RubyGems
gem install wpscan
You can update the local database by using
wpscan --update
Enumerating usernames
wpscan --url https://target.tld/ --enumerate u
Enumerating a range of usernames
wpscan --url https://target.tld/ --enumerate u1-100
Doc>> https://github.com/wpscanteam/wpscan/wiki/WPScan-User-Documentation
I have encountered 3 problems while following this guide to installing Metasploit Framework on Ubuntu and Debian:
1) After installing proper version of ruby, there is a command given for installing Ruby libraries: sudo gem install bundler. When I typed that in and hit enter, it says "command not found". After some researching on the internet, I decided to remove sudo and try again. So I've entered gem install bundler and it worked fine. Will this cause any problems?
2) After installing Metasploit Framework, there is a command given to install the required gems and versions:
cd metasploit-framework
bundle install
But when I tried that, I got this error:
rbenv: version '2.1.6' is not installed
I really don't know what to do next (But I moved on).
3) Probably due to the previous problems, in the end when I executed msfconsole command, it said
could not find rake-10.4.2 in any of the sources.
run bundle install to install the missing gems
But the bundle install doesn't help either, because when I run that it says
Could not locate Gemfile or .bundle/directory
Any help would be appreciated.
EDIT: When I asked the person himself who had written the guide, regarding this, he told me to select the version of ruby I had just installed with either rebind or RVM before installing bundler, and then to run the bundle install. Could you please list the commands to do so? I am really new to Linux!
step 1 :
sudo apt-get update
sudo apt-get upgrade
step 2 :
Install dependent packages
sudo apt-get install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev openjdk-7-jre git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev curl zlib1g-dev
step 3 :
Install Ruby
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
source ~/.bashrc
rvm install 2.1.6
rvm use 2.1.6 --default
ruby -v
step 4 :
Install and configure postgresql
sudo apt-get install postgresql
sudo -s
su postgres
createuser msf -P -S -R -D
createdb -O msf msf
exit
Step 5 :
Install Metasploit Framework
cd /opt
sudo git clone https://github.com/rapid7/metasploit-framework.git
sudo chown -R `whoami` /opt/metasploit-framework
cd metasploit-framework
cd metasploit-framework
sudo bash -c 'for MSF in $(ls msf*); do ln -s /opt/metasploit-framework/$MSF /usr/local/bin/$MSF;done'
Still if you are facing any issue, you can download the iso or vm image from kali wesbite
I have this problem in kali after install metasploit-framework, and i can't run msfconsole. I solved the problem using the following method:
At change your directory to /usr/share/metasploit-framework:
cd /usr/share/metasploit-framework
and after that, install bundler with gem:
gem install bundler
then:
bundle install
at the end you need to update:
gem update --system
and it will work!
This command fixes it:
apt-get install ruby2.1-dev &&\
apt-get install libsqlite3-dev &&\
bundle install
What it does: install ruby development items
I installed RVM on my Fedora 19 system a few months ago, and it was working fine. Then I had some other work and when I opened the machine again, it said:
# rvm
bash: rvm: command not found...
I tried to reinstall RVM, and this is what I get:
# rpm -i rvm-devel-1.17-8.fc19.x86_64.rpm
package rvm-devel-1.17-8.fc19.x86_64 is already installed
But I can't find it.
# ps ax | grep rvm
14363 pts/0 S+ 0:00 grep --color=auto rvm
Can anyone help me? What exactly is the problem?
P.S: The package rvm is there on the system.
# rpm -q rvm
rvm-1.17-8.fc19.x86_64
I recommend you to reinstall RVM, maybe it's crashed due to some event.
Use this command to implode it:
rvm implode
Or:
rm -rf ~/.rvm
Then install it by running:
sudo apt-get install curl
curl -L get.rvm.io | bash -s stable --auto
Then you'll need to reload the ~/.bash_profile file which you can do with this small command:
. ~/.bash_profile
Make sure to install other packages needed for Ruby to work:
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
sudo apt-get install pkgconfig
Now install the latest Ruby:
rvm install 2.0.0
rvm use 2.0.0
ruby -v
Now you can install Rails:
gem install rails -v 4.0.0
the package rvm-devel-1.17-8.fc19.x86_64 is not rvm as per http://rpm.pbone.net/index.php3/stat/4/idpl/20537074/dir/fedora_19/com/rvm-devel-1.17-8.fc19.x86_64.rpm.html it is:
The rvm-devel package contains libraries and header files for
developing applications that use rvm.
Follow installation instructions http://rvm.io/rvm/install to get RVM installed, make sure to read the outputs as important hints might be printed for you.
to uninstall rvm use anyone of the following:
rvm implode
or
rm -rf ~/.rvm
Just to be sure restart the terminal before you try installing rvm again
I have installed gem on Ubuntu 10.10 32 bit with
apt-get install gem -y
But when I try to run
gem install something.gem
I get the error of the command not being found.
bash: gem: command not found
I installed gem, is there any reason it is saying it can't find the command?
These files were install by gem package
http://pastie.org/3483416
Try the following:
sudo apt-get install rubygems
Are you wanting ruby gems? If so, you need to install libgemplugin-ruby and then the ruby 'gem' program will be in your path:
aptitude install libgemplugin-ruby
The following command installs ruby gem for ubuntu:
apt-get install libgemplugin-ruby
I did it after ruby was installed.
Installing this package allows you to use gem command on Debian 8:
apt-get install rubygems-integration
To install a gem package you might also need:
apt-get install ruby ruby-dev
On Debian, Ubuntu or Linux Mint:
$ sudo apt-get install rubygems ruby-dev
On CentOS, Fedora or RHEL:
$ sudo yum install rubygems ruby-devel
FWIW, the equivalent package for RHEL/Fedora/CentOS/etc and SuSE/OpenSuSE appears to be called 'rubygems'.
The following command may help you
sudo apt-get install ruby
On Ubuntu 14.04,
apt-get install ruby ruby-dev
this will install gem for you.
On CentOS 7 you can do:
yum -y install rubygems-devel
That worked for me.
I had the same problem. What I did was:
sudo apt-get update
And then reinstall ruby-full
sudo apt-get install ruby-full
check that rvm is a function type rvm | head -1
I know this is kind of late for a response. But I did run into this error and I found a solution here:
https://rvm.io/integration/gnome-terminal
You just have to enable 'Run command as login shell' under the terminal preferences.
The following command will give you the list of files that the gem package installed:
dpkg -L gem
that should help you troubleshoot.
try
$ /usr/bin/pd-gem
or
$ pd-gem
On Centos 8:
eventually, download the file of the application:
wget https://rubygems.org/downloads/asciidoctor-2.0.16.gem
then execute:
yum install -y rubygems ruby-devel
gem install asciidoctor
More: I tried positively also in a container (using the appropriate RUN and COPY statements before the commands).
I'm trying to get RMagick setup on Ubuntu 10.04. Looked here but had no joy. I even compiled and installed ImageMagick from source, but the instructions here still didn't help me when I try to install RMagick using RubyGems. I got this error:
carcher#carcher-laptop:~/Code/temp/RMagick-2.13.1$ sudo gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
carcher#carcher-laptop:~/Code/temp/RMagick-2.13.1$
What does it all mean? :) I'm new to Ruby and RubyGems so please be gentle. My setup is as follows:
Ruby: 1.8.7
RubyGems: 1.3.7
I'm pretty much out of ideas (and tired too!). I tired to compile RMagick from source using the link above but it failed as there was no ./configure script :(
Any and all help appreciated!
Install the packages imagemagick and libmagickwand-dev (or libmagick9-dev). You should then be able to install the Rmagick Gem.
sudo apt-get install imagemagick libmagickwand-dev
If not, you are missing ruby related development packages like build-essential and ruby1.8-dev. If that's the case, a generic "ubuntu install ruby 1.8" query in google should sort you out.
You don't need a lot of the other junk in these answers, just:
sudo apt-get install libmagickwand-dev
On Ubuntu 12.04 libmagick9-dev is gone. graphicsmagick-libmagick-dev-compat should be used instead.
apt-get install graphicsmagick-libmagick-dev-compat
On Ubuntu 15.04, what solved it for me was to remove all previous *magick installations, reinstall required packages and then symlink the config file:
sudo apt-get purge graphicsmagick graphicsmagick-dbg imagemagick-common imagemagick imagemagick-6.q16 libmagickcore-6-headers libmagickwand-dev graphicsmagick-libmagick-dev-compat
sudo apt-get autoremove
sudo apt-get install imagemagick libmagickwand-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-config
gem install rmagick
In Ubuntu 14.04
Below code is worked for me
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev
Then,
gem install rmagick
On Ubuntu 12.0.4.2 sudo apt-get install libmagickwand-dev libmagickcore-dev libmagickcore4-extra libgraphviz-dev libgvc5 worked for me.
graphicsmagick-libmagick-dev-compat installed but didn't include the header files so rmagick wouldn't compile.
Please note, you need to remove graphicsmagick-libmagick-dev-compat before running the command above.
this worked for me...
sudo apt-get install graphicsmagick-libmagick-dev-compat libmagickwand-dev
gem install rmagick
...
Building native extensions. This could take a while...
Successfully installed rmagick-2.13.1
1 gem installed
(ubuntu 12.0.4 64bit)
You got message extconf.rb:1:in 'require': no such file to load -- mkmf (LoadError) because package ruby1.8-dev isn't installed. Install it (sudo apt-get install ruby1.8-dev) and try again.
In Ubuntu 13.10
This code worked for me
sudo apt-get install graphicsmagick-libmagick-dev-compat libmagickwand-dev
gem install rmagick
To get bundle to stop failing on ubuntu 12.04.
apt-get install graphicsmagick-libmagick-dev-compat libmagickwand-dev
This is my gemfile
gem 'rmagick'
gem 'mini_magick'
On Ubuntu, you can run:
sudo apt-get install libmagickwand-dev
On Centos, you can run:
sudo yum install gcc ImageMagick-devel make which
Then install
gem install rmagick
If you want to try installing the native deb package instead of the gem, be aware that the librmagick-ruby was broken on Ubuntu 10.04 until just very recently:
https://bugs.launchpad.net/ubuntu/+source/librmagick-ruby/+bug/518122
See comment #17 in particular. I believe this has already been fixed so now apt-get install librmagick-ruby might "just work". Otherwise here's how to build it yourself from source
$ cd /usr/src
$ sudo apt-get build-dep librmagick-ruby
$ sudo apt-get source librmagick-ruby
$ cd librmagick-ruby-2.11.1
$ sudo dch -i
(add changelog entry)
$ sudo dpkg-buildpackage
$ cd ..
$ sudo dpkg -i librmagick-ruby*.deb
In ubuntu 16.04.3:
This i worked:
sudo apt install imagemagick imagemagick-6.q16
It means this installed imagemagick then you can run RMagick.
If you are using Linux then simply run these commands.
sudo apt-get install imagemagick libmagickwand-dev
and then
bundle install
Hope this will resolve your issue.
And if you are using mac then simply run following commands
First of all unlink your installed imagemagick which was not properly installed in latest mac high sierra by using.
brew unlink imagemagick
then install latest imagemagic6 using below command
brew install imagemagick#6 && brew link imagemagick#6 --force
Then install gem rmagick using below command
gem install rmagick
bundle install
It will work perfectly fine.
Follow below 3 steps proven on UBUNTU 16.04
sudo apt-get install build-essential imagemagick libmagickwand-dev
#In .bashrc or .bash_profile add below code. Just check the ImageMagick dir name.
export PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH"
gem install rmagic #Install Gem