Tuesday, February 22, 2011

Why Deleting Sqlite3 is One of the Worst Things You Can Do on CentOS / RHEL

Yes, I did just that. I unintentionally deleted my sqlite3 database application due to a script function that takes a list of RPM packages, installs them and automatically creates an uninstall / rollback script which involves force deleting them - rpm -e --nodeps [package name].

So then with my sweet little script, i took a list of the RPM packages, pushed them into the function, run the function and voila, i have upgraded my server nicely and created an uninstall script. Amazing, but not until I had to run the uninstall. It was successful but what's the catch? It also erased my sqlite3 database application.

It wouldn't have been that much of a big deal if only Redhat Packager Manager or RPM didn't use it for storing data. Now because of this, rpm, rpm2cpio, yum or any package utility that encapsulates RPM will no longer work. You'll mostly likely see this error when you do use any of the mentioned utilities.

"rpm: error while loading shared libraries: libsqlite3.so.0: cannot open shared object file: No such file or directory"

RPM-based operating systems like RHEL and CentOS' life is the package manager, not that you can't install from source, but because that's how the architecture is and should be used. Installing from source would most likely introduce more complexities to the system that's hard to solve so it is recommended to getaway from them as much as possible for these types of operating systems. Therefore, it is my opinion that this is simply one of the stupidly worst things you can do with RHEL and CentOS. It gets the next top spot after an "rm -rf *" after a  "cd /".

So people, be careful. :)

  • Related Links Widget for Blogspot

No comments: