Above problem happened to me several times, untill I started doing the following:
First, use install.sh with --softwareonly. This prevents the installer to go into configuration mode. The problem as far as I can see is a broken ldap. So with --softwareonly it installs but does not upgrade.
Then, fix the ldap database. In my case, I had to upgrade from 32 bit to 64 bit and reconstruct the database. There is a post in the forum
Exporting and Importing Zimbra LDAP Data » Zimbra :: Blog how to do that.
If it's not 32->64 bit, then recover the database.
I think (as root) doing
/opt/zimbra/bdb/bin/db_recover -v -h /opt/zimbra/data/ldap/hdb/db
will fix it. Sometimes you get an error (something about wrong version) and then you have to use the other db_recover that is in /opt/zimbra/bdb-SOMEVERSIONNUMBER. ..
After you fixed ldap, then run /opt/zimbra/libexec/zmsetup.pl
Good luck