Skip to main content

Installing ruby 1.9 from source on debian/ubuntu, the rubygem/zlib/ssl problem

Since I noticed some people experienced the same problem, and the solution to this is scattered into multiple posts/comments, I'll just integrate it here.

Basically if you install ruby 1.9 (or probably other versions) from source in Debian based distribution (like Ubuntu), the zlib part of Ruby won't be installed. This problem will reveal itself when you want to install Rubygems, for example Rails for Ruby on Rails.

The solution is:
1. Clean up all that failed compiled files in the directory where you run "make". Just to be on the safe side.
2. Install zlib headers (zlib1g-dev in Debian Lenny) using your distro package manager.
2a. While you're at it, also install ssl headers (libssl-dev in Debian Lenny) using your distro package manager.
3. Run "./configure", "make", "make install".
4. Run "./configure", "make", "make install" again.

It should work then.

In my understanding, the problem is caused by Ruby's zlib compilation process that requires.. ruby, which is not created yet. So basically you try to install ruby as best as you can, then use that ruby to install the complete version of ruby.

Comments

Popular posts from this blog

A quote from "Virgin": "Saya Masih Perawan".

The intended readers of this post are liberals. You have been warned. I had just turned on my tv and saw the last minutes of the movie "Virgin" (2004), made in Indonesia. It's the first time I see this movie. The movie title's alone is enough to cause controversy in Indonesia, a country with the largest moslem population in the world. The content is said to be even more controversial ( http://www.opensubscriber.com/message/buletin-studia@yahoogroups.com/293663.html) due to it's vulgar depiction of sex and ..cursing. Many groups deemed it immoral enough that it was pulled from circulation within 2 weeks (correct me if I'm wrong). Anyway, I'm particularly interested in the last scenes of this movie. A high school girl is standing on a platform talking about something (I didn't pay attention). Many people such as fellow students and some adults watch her. After she finish talking, she pause. But everybody seems waiting her to say something. Finally...

My employees are holding a strike, yay!

Today almost 80% of my employees are holding a strike. The cause was pretty simple, one old employee who had a pretty bad track record was.. verbally disciplined. For whatever reason, he couldn't accept that reprimand so he told his work friends. Now, some of those friends were talented provocators (really. they were pretty good..) . I had awared of them since years ago but they behave well enough so... They coordinate a strike bringing almost 80% of them. The detail is rather sketchy since I wasn't present when the incidence happen. I'll update later. But one thing for sure, I now have a reasonable basis to fire those provocators. Yay! But now I must deal with some future consequences... *sigh*