RVM on Arch Linux multilib and Its Inability to Find gcc and libtool
Arch repos recently upped their ruby version to 2.0.0. A good thing in general, but it slightly messed up a rails project I was working on. Suddenly a bunch of things were broken. A quick Google search later, it was clear that RVM was the solution to my problems. It was, however, not being very nice to me.
$ rvm install ruby-1.9.3-p392 Searching for binary rubies, this might take some time. No binary rubies available for: arch/libc-2.17/x86_64/ruby-1.9.3-p392. Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. Installing requirements for arch, might require sudo password. [...] error: package 'gcc' was not found error: package 'libtool' was not found Installing required packages: gcc, libtool...... Error running 'requirements_arch_libs_install gcc libtool', please read /home/ward/.rvm/log/ruby-1.9.3-p392/1366392891_package_install_gcc_libtool.log
Essentially, it was not finding
gcc. Something I definitely have installed,
though it is provided by a different package,
gcc-multilib, since I am on
64 bit Arch and still need some of the programs that only have a 32 bit
version. Luckily I came across this bug
report describing my
problem exactly as well as, more importantly, a fix to the issue at hand.
The fix seems to be targeted for release in RVM 1.20, so there is a good chance all you need to do to fix your issue is update RVM. If that did not work, we can go and apply the commit ourselves already.
$ cd ~/.rvm/ $ wget https://github.com/wayneeseguin/rvm/commit/949f2a1708fa99b389af7c72c8bfd4fd7ae17322.diff $ patch -p1 < 949f2a1708fa99b389af7c72c8bfd4fd7ae17322.diff
What this does is go into the RVM folder, download the commit from earlier as a diff file and finally apply it to our folder. Having done this, you should be able to install ruby versions without any problems as described in the RVM documentation.