I encountered this weird problem in installing the VMware rpm package on CentOS 5. On a fresh install, I immediately ran:
# rpm -Uvh VMware-server-1.0.3-44356.i386.rpm
and I received errors such as:
Preparing… ########################################### [100%]
Unable to find the answer INITSCRIPTSDIR in the installer database
(/etc/vmware/locations). You may want to re-install VMware Server.\n\nExecution
aborted.
error: %pre(VMware-server-1.0.3-44356) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping VMware-server-1.0.3-44356
I fired up my google-fu and found out that:
1. If I install the VMware rpm package without removing first /var/lib/rpm/__db.* and doing an rpm – -rebuilddb, VMware install will fail with the error above.
2. If I reinstall VMware rpm package after removing /var/lib/rpm/__db.* and doing an rpm – -rebuilddb, install will fail as well.
3. If I remove /var/lib/rpm/__db.* and do an rpm – -rebuilddb, installation will proceed successfully.
4. If I reinstall VMware even after a failed installation, while making sure that /etc/vmware is deleted, installation will proceed successfully.
Hope this helps.