0

I have three questions about compiling ruby (and other softwares) from source. Ruby is avaliable to install using apt-get, but I want to learn more about Linux and I want to compile from source.

I am using Ubuntu 14.04 LTS. I first downloaded ruby source from ruby site and extracted in my home: /home/rgiaviti/ruby-2.1.2. Then, I opened terminal and typed:

rgiaviti@ubuntupc:~$ cd /home/ruby-2.1.2
rgiaviti@ubuntupc:~/ruby-2.1.2$ ./configure
rgiaviti@ubuntupc:~/ruby-2.1.2$ make
rgiaviti@ubuntupc:~/ruby-2.1.2$ sudo make install

After a lot of output, everything worked fine. Absolutely fine. I tested ruby interpreter this way:

ruby --version

Output:

ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]

Success, right? Now, my questions:

  1. When a new ruby interpreter is released, how do I upgrade my installed version? Just do the same thing I do when installing?
  2. Can I delete the folder that I extracted the source (/home/rgiaviti/ruby-2.1.2)?
  3. Is there a way to uninstall the interpreter, like a apt-get remove, but for compiling from source?

I think, that's all. Thanks.

1

When a new ruby interpreter is released, how do I upgrade my installed version? Just do the same thing I do when installing?

Probably, presuming that new versions don't change paths. This is fairly unlikely to break updated installs, but might leave detritus littered around your system.

Can I delete the folder that I extracted the source (/home/rgiaviti/ruby-2.1.2)?

Yes. After install, this is no longer needed.

Is there a way to uninstall the interpreter, like a apt-get remove, but for compiling from source?

No! Personally, I would never directly install from source. As I mention above, this often results in files littered through your system. In the future, I would recommend using CheckInstall, which rolls your install into a package for easy management.

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.