diff --git a/build.sh b/build.sh
index 340fd99bebcb39b8f3f2fbd3e9afe8ff75b881d2..cb3b89c005b37728fdebdbedcb70dcf7b3c12281 100755
--- a/build.sh
+++ b/build.sh
@@ -20,6 +20,7 @@ function apt_get_install {
     groff-base \
     libsasl2-modules-gssapi-mit \
     libc6-dev \
+    libkrb5-dev \
     libssl-dev \
     libsasl2-dev \
     libperl-dev \
@@ -51,6 +52,7 @@ function install_cyrus_sasl {
         CFLAGS="-Wno-cast-function-type -Wno-implicit-function-declaration"
     make && make install
     ln -s ${ARTIFACTS}/usr/lib/sasl2 /usr/lib/sasl2
+    (cd ${ARTIFACTS}/usr/lib; ln -s libsasl2.so.3.0.0 libsasl2.so.2)
 }
 
 # Install OpenLDAP
@@ -67,9 +69,7 @@ function install_openldap {
         --enable-slapd --enable-dynacl --enable-aci --enable-cleartext --enable-crypt --enable-spasswd \
         --enable-rewrite --enable-rlookups --enable-slapi --enable-backends=mod --enable-overlays=mod \
         --with-subdir=ldap --with-cyrus-sasl --with-threads --with-tls=openssl \
-        LDFLAGS="-L${ARTIFACTS}/usr/lib \
-             -L${ARTIFACTS}/usr/lib/sasl2 \
-             -Wl,-rpath,${ARTIFACTS}/usr/lib,-rpath,${ARTIFACTS}/usr/lib/sasl2" \
+        LDFLAGS="-L/usr/lib/sasl2 -Wl,-rpath,/usr/lib/sasl2" \
         CFLAGS="-Wno-cast-function-type \
                 -Wno-implicit-function-declaration \
                 -Wno-incompatible-pointer-types \