I have problems installing ruby 2.1.0 via RVM on Arch. My vagrant provisioning file looks like this:

sudo pacman -Syu --noconfirm
sudo pacman -S --needed base-devel --noconfirm
sudo pacman -S vim --noconfirm
sudo pacman -S git --noconfirm
sudo pacman -S wget --noconfirm
sudo pacman -S gcc --noconfirm
sudo pacman -S clang --noconfirm
sudo pacman -S libyaml --noconfirm

rvm installs 'fine' and I'm able to install ruby 1.9.3 via it. However it fails for 2.0.0 or 2.1.0:

[vagrant@vagrant-archlinux ~]$ rvm install 2.1.0
ruby-2.1.0 - #removing src.
Searching for binary rubies, this might take some time.
No binary rubies available for: arch/libc-2.19/x86_64/ruby-2.1.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for arch.
Requirements installation successful.
Installing Ruby from source to: /home/vagrant/.rvm/rubies/ruby-2.1.0, this may take a while depending on your cpu(s)...
ruby-2.1.0 - #downloading ruby-2.1.0, this may take a while depending on your connection...
ruby-2.1.0 - #extracting ruby-2.1.0 to /home/vagrant/.rvm/src/ruby-2.1.0.
ruby-2.1.0 - #applying patch /home/vagrant/.rvm/patches/ruby/2.1.0/changeset_r44327.diff.
ruby-2.1.0 - #applying patch /home/vagrant/.rvm/patches/ruby/libyaml015.patch.
ruby-2.1.0 - #applying patch /home/vagrant/.rvm/patches/ruby/GH-488.patch.
ruby-2.1.0 - #configuring....................................................
ruby-2.1.0 - #post-configuration.
ruby-2.1.0 - #compiling..................|
Error running '__rvm_make -j1',
showing last 15 lines of /home/vagrant/.rvm/log/1392246637_ruby-2.1.0/make.log
transdb.h unchanged
making trans
make[1]: Entering directory '/home/vagrant/.rvm/src/ruby-2.1.0'
compiling ./enc/trans/transdb.c
linking transcoder transdb.so
compiling ./enc/trans/big5.c
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
enc.mk:760: recipe for target 'enc/trans/big5.o' failed
make[1]: *** [enc/trans/big5.o] Error 4
make[1]: Leaving directory '/home/vagrant/.rvm/src/ruby-2.1.0'
uncommon.mk:560: recipe for target 'trans' failed
make: *** [trans] Error 2
There has been an error while running make. Halting the installation.


  • Is it possible that you're running out of memory? Anything interesting on syslog or dmesg? – Roberto Rodriguez Alcala Feb 15 '14 at 16:20

Roberto Rodriguez Alcala is correct, you are running out of memory.

I've had exactly this problem, with Arch on my Raspberry. (B model with 512MB)

Creating a swap file solved the problem for me alternatively you can create a standalone swap partition if you like.

To create a swap file, (source Arch Wiki);

fallocate -l 256M /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile

To add a swap partition add the following line to /etc/fstab:

/dev/sda2 none swap defaults 0 0

Remember to use appropriate device where you created your swap partition, instead of sda2.


Install Ruby with RVM

first run a update to make sure that all of package uptodate

# pacman -Sy

start installing RVM, Ruby Version Manager

# pacman -S curl

To install RVM

# curl -L get.rvm.io | bash -s stable

After installing open .bashrc file

# vi .bashrc

Add this to the end

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

This will start RVM on startup, exit your session and log backin.

RVM has some of its own dependencies that need to be installed

# rvm requirements

Before installing Ruby, you need to install libyaml if you plan on installing Rails

# sudo pacman -S libyaml

installing Ruby with RVM is easy

# rvm install 1.9.3

Ruby is now installed. However, since we accessed it through a program that has a variety of Ruby versions, we need to tell the system to use 1.9.3 by default.

# rvm use 1.9.3 --default

If you need to install gems, follow this too Install RubyGems

# rvm rubygems current

Install Rails

# gem install rails

check version Using

ruby -v
rails -v

If you lazy to work around above try this

# \curl -sSL https://get.rvm.io | bash -s stable


# rvm list

# rvm use { your wish version }

# rvm use version which you installed
  • Never run pacman -Sy; pacman -S $package: it will lead to breakage... Also, this doesn't answer the question: OP has RVM installed and ruby-1.9.3. – jasonwryan Feb 20 '14 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.