Sunday, January 21, 2007

I deleted zlib in a live environment!

I really don't know what the BIG deal about RHEL is; if anything i have found it to be annoying, HARD to upgrade (rpms are scarce). Definitively CentOS is wiser choice. Try upgrading to PHP 5.2 on RHEL 4! now... just for kicks try the upgrade on a X86_64 platform. I have been going crazy about this. Some good soul posted his experiences on a 686 platform:

http://www.jasonlitka.com/2006/11/30/upgrading-php-520-rhel-centos/


I have being trying to get all the dependencies for X86_64 and it is very very hard. While i was going crazy about getting a succesful spec build:

rpmbuild -bb php.sec

I get many many many dependencies issues (sqlite,mysql-dev,libpng,etc,etc,etc,etc) I bump that it is complaing about a libc flag not being there "-fPIC", I start searching the web for references for this happening to someone else, and i find several places pointing to a solution by simply updating the zlib libraries.


Never I suspected i was about to venture into dark, scary, uncharted territory. So being as naive as i can i write

rpm -e --nodeps zlib(dont remember the full name)


Let the fun begin:
First i notice that wget, ssh, up2date,rpm or mostly anything else for that matter is working anymore, uh oh. Let me say it again: Uh oh.

Funny thing, this is a colocation server. I am i a different Country, i have no access to the server. I call up the people at The Planet, they suggest i get an OS reload. NOT a choice, there is a lot of valuable data there that would take DAYS to restore since i would have to upload everything again. (whole story being that i HAD to build the .rpm there since there is no php 5.2 rpm for RHEL and i dont have access to another server with the same characteristics).




I noticed that ftp is about the only service currently working. So i went to grab zlib at

http://www.zlib.net/

Since gunzip or tar are not working i had to extract the files in some other server and upload the files already extracted.

After that i cross my fingers and write

./configure

Nope, not working so i read further and notice that i should write for my system

./configure --shared --lib=/usr/lib64


I got away with this one easily... scared but no harm done.

I hope this helps someone. I learned that if you get a collocation server... do yourself a favor and get NAS.


Bye!


No comments: