Can't start IMAP

I have just updated all the ports on my server (after 6 months of not doing it) and now I can't start my Courier IMAP and IMAP-SSL service.

This is the error I get the in the /var/log/mailog:
Code:
Oct  8 16:47:34 alpha imapd: /libexec/ld-elf.so.1: Shared object "libgdbm.so.3" not found, required by "couriertcpd"
Oct  8 16:47:45 alpha imapd-ssl: /libexec/ld-elf.so.1: Shared object "libgdbm.so.3" not found, required by "couriertcp

Any ideas as to how I resolve this? I have had a look around but am still stumped :\
 
I deinstalled and reinstalled:

databases/gdbm


and tried to start the IMAP and IMAPS services but am still getting the same error.

If I deinstall/reinstall Courier IMAP will I lose my config?

Any other ideas? :e
 
The problem is that databases/gdbm got updated, and their library version got increased (That's the number after the .so). However, your Courier IMAP probably didn't get updated, or got updated BEFORE you updated gdbm, and tries to use the old version of gdbm -- Which is no longer present.

Reinstall courier IMAP and you should be fine. Make sure you run a [cmd=]make clean[/cmd] first so that all previous build files of courier imap are removed. How exactly did you reinstall all ports? If you use portmaster or portupgrade this should, in theory, not happen. There's also a chance you got other ports that don't properly work.

From my pesonal collection, here's a script that should find these

Code:
#!/bin/sh

libraries()
{
  localbase="/usr/local"
  libdirs="/bin /sbin /libexec /lib /usr/bin /usr/sbin /usr/lib /usr/libexec \
  ${localbase}/bin ${localbase}/sbin ${localbase}/lib ${localbase}/libexec"

  echo "===> Checking for unresolvable libraries"

  for d in ${libdirs}; do
    echo "${d}"
    for f in $(find ${d} -type f); do
      ldd "${f}" 2>&1 | grep -v "not a dynamic" | grep "found"
    done
  done
}
libraries

If I deinstall/reinstall Courier IMAP will I lose my config?

Ports should not override config files, but there's always a possibility. Backing up /etc/ and /usr/local/etc/ is *always* a good idea. I personally prefer to use rdiff-backup and backup to /var/backups/ on a daily basis.
 
I didn't reinstall all my ports, I just updated them with:
Code:
portmanager -u

I've always done it this way although there are a few ports that haven't/won't update. So is the next step to run:
Code:
make deinstall clean

in:
/usr/ports/mail/courier-imap
 
PS: I ran your script (thanks!) and it said:
Code:
===> Checking for unresolvable libraries
/bin
/sbin
/libexec
/lib
/usr/bin
/usr/sbin
/usr/lib
/usr/libexec
/usr/local/bin
        libgdbm.so.3 => not found (0x0)
/usr/local/sbin
/usr/local/lib
        libperl.so => not found (0x0)
        libperl.so => not found (0x0)
/usr/local/libexec
        libgdbm.so.3 => not found (0x0)
        libgdbm.so.3 => not found (0x0)
)

I've also made a backup (copy) of my imapd and imaps-ssl config file.
 
Right, it doesn't show the files it found problems at. Oops :r I never ran into the condition where I had a problem so, well ... :\

Thanks for testing, here's an updated version:

Code:
#!/bin/sh
localbase="/usr/local"
libdirs="/bin /sbin /libexec /lib /usr/bin /usr/sbin /usr/lib /usr/libexec \
  ${localbase}/bin ${localbase}/sbin ${localbase}/lib ${localbase}/libexec"

  echo "===> Checking for unresolvable libraries"

  for d in ${libdirs}; do
    echo "Checking ${d}..."
    for f in $(find ${d} -type f); do
      check=$(ldd "${f}" 2>&1 | grep -v "not a dynamic" | grep "found")
      if [ $? -eq 0 ]; then
        echo "Found a problem in ${f}"
        echo "${check}"
      fi
    done
  done
 
Thanks to all for your help. I reinstalled Courier IMAP this morning and its all working fine now. I will be sure to update my ports more frequently!
 
Back
Top