So this weekend. I was trying to install openldap the most recent version on my server at home. So I did it and like always when you try to install some new software on your computer the configure script usually fails saying you have some missing or outdated libraries.
I ran the configure script for my ldap source code and it failed saying that I had an older version of cyrus-sasl so I went and downloaded the cyrus-sasl software and installed a new version. The new version got installed an then I was able to configure my openldap build. I ran make install and I was able to install openldap. I was really happy because it was working and I was able to build an address book and get other cool information on my new ldap server database.
So guess what a day later I tried to open pine to check one of my accounts and it said that some libldap.so file was missing , oh no this sucks.
It was trying to look for a library so what I did I setup a symlink to point to a new libldap.so that was installed by the new ldap software.
So after that got fixed I got another library error message when trying to load pine. So fine I had to create another symlink to another library that was installed by the new ldap software.
Once i fixed that symlink I was able to start the pine software. Cool then I noticed that I was having problems with sending mail saying that my outgoing email username and password was not working. I restarted sendmail and guess what I got an error message saying I had some missing
cyrus-sasl libraries missing. Damn
It looks like everything got hosed, this was a nightmare. I don’t want to make things longer but let me say that I screwed up my server, usually when I build software I install it using the make install command and i choose the folder where things should be installed.
My mistake was that I used checkinstall to install this new software. Checkinstall basically creates rpms and installs them and what happened is that after I built the software and installed it checkinstall just overwrote my original RPM’s .
I should’ve just done make install because make install would’ve put the software on the right directories without overwritting my existing software.
Still I was able to learn a lot of stuff. There is always something positive out of something bad.
1.-I was able to configure openldap from scratch, I installed a new cyrus-sasl from scratch, and berkeleydb 4 in order to get openldap started.
2.-I was able to configure an address book on my new ldap server. I was even able to query it using netscape and outlook express.
3.-Installing openldap was a pain on the ass but after hard work it worked and it was up and running.
4.- I hacked an init script to make openldap start.
Then after I realized that everything broke. I learned the following.
1.-Don’t use checkinstall and use make install only for certain packages specially if it will replace existing software. I had known this before but I was working on ldap for almost 48 hours and I was tired. Still don’t make the same mistakes again.
2.- I learned how to fix certain error messages using symlinks to libraries requested by programs that can’t find certain libraries.
3.-I learned to fix a broken linux server by removing rpm’s rebuilding rpms just so they can be removed.
here is a good tip on how to remove duplicate rpms
rpm bad-package -e –allmatches
4.-I was able to figure out what had caused all the damage to my existing programs and servers.
I had to uninstall openldap and the new cyrus-sasl software just to get my server working and although my ldap server is gone.
I was able to fix everything my server and everything is back to normal.
At least I know that I can build openldap again and without causing the sames problems.
:)
penguincares.