1

I have just installed (built from source) Ruby 1.9.3 onto my CentOS 6.4 system, but found shortly afterwards that I should have installed libyaml first.

How do I uninstall Ruby 1.9.3, so that I can install libyaml before rebuilding and reinstalling Ruby? Are there any other libraries I should install at the same time as libyaml to avoid having to go through this for a second time?

If it makes any difference, I'm doing this on a machine that isn't connected to the internet.

James Baker
  • 1,143
  • 17
  • 39

2 Answers2

1

If you built from source and kept the source code, then you should be able to run:

$ cd path/to/ruby/source
$ make uninstall

You might need to sudo it.

If you haven't kept the source code, then it's messier. You will have to locate all of the files created by the installation and remove them manually. On CentOS you should have the locate command, so just run:

$ sudo updatedb
$ locate ruby

That will give you a long list of files. You should be able to work out which ones were installed and remove them.

While you're rebuilding, include libreadline (might not be the exact name). I've had to re-build ruby for this a number of times.

Jon Cairns
  • 11,783
  • 4
  • 39
  • 66
  • Thanks, this sounds promising - I'll check it out on Monday at work. Do all software packages built from source have a make uninstall? [/linuxNewbie] – James Baker Jul 19 '13 at 14:07
  • They *should* do, but reality is that they don't have to. The `Makefile` specifies what actions you can and can't perform, and there are some mainstays like `make`, `make install` and `make uninstall` that exist in just about all make-based projects. – Jon Cairns Jul 19 '13 at 14:53
  • `make uninstall` didn't work - apparently the build I was using didn't have that functionality. – James Baker Aug 04 '13 at 15:38
0

Recompiling and reinstalling over the top seemed to work fine.

James Baker
  • 1,143
  • 17
  • 39