Solusi Directadmin error: Cannot find imap library (libc-client.a) Centos 6

Jika anda mendapati error seperti ini “configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation” ketika melakukan kompilasi imap directadmin di Centos 6 maka solusinya anda bisa menggunakan script ini untuk mengkonfigurasi libc-client.a

Pertama install dulu ini

yum install -y pam-devel libc-client libc-client-devel

Kemudian buat script ini

CWD=`pwd`
OS=`uname`

#Is it a 64-bit OS?
B64=0
    
B64COUNT=`uname -m | grep -c 64`
if [ "$B64COUNT" -eq 1 ]; then
    B64=1
    LD_LIBRARY_PATH=/lib64:/usr/lib64:/usr/local/lib64:/lib:/usr/lib:/usr/local/lib
    export LD_LIBRARY_PATH
fi

if [ ! -e /usr/include/krb5.h ] && [ -e /etc/redhat-release ]; then
    echo "Installing krb5-devel"
    yum -y install krb5-devel
fi

VERSION=2006k
URL="ftp://ftp.cac.washington.edu/imap/old/imap-${VERSION}.tar.Z"
FILENAME=imap-${VERSION}
TARBALL=${FILENAME}.tar.Z

echo "Downloading ${TARBALL}..."
wget -O ${TARBALL} ${URL}
tar xzf ${TARBALL}
cd ${FILENAME}

echo "Installing ${FILENAME}..."

if [ ${OS} = "FreeBSD" ]; then
    if [ ${B64} -eq 0 ]; then
        make bsf
    else
        make bsf EXTRACFLAGS=-fPIC
    fi
else
    perl -pi -e 's#SSLDIR=/usr/local/ssl#SSLDIR=/etc/pki/tls#' src/osdep/unix/Makefile
    perl -pi -e 's#SSLINCLUDE=\$\(SSLDIR\)/include#SSLINCLUDE=/usr/include/openssl#' src/osdep/unix/Makefile
    perl -pi -e 's#SSLLIB=\$\(SSLDIR\)/lib#SSLLIB=/usr/lib/openssl#' src/osdep/unix/Makefile
    if [ ${B64} -eq 0 ]; then
        make slx
    else
        make slx EXTRACFLAGS=-fPIC
    fi
fi

echo "Copying files to /usr/local/php-imap"
mkdir -p /usr/local/php-imap/include
mkdir -p /usr/local/php-imap/lib
chmod -R 077 /usr/local/php-imap
cp -f c-client/*.h /usr/local/php-imap/include/
cp -f c-client/*.c /usr/local/php-imap/lib/
cp -f c-client/c-client.a /usr/local/php-imap/lib/libc-client.a
cd ..
rm -rf ${FILENAME}

exit 0;

Dan jalankan scriptnya, selanjutnya edit

nano /usr/local/directadmin/custombuild/configure/ap2/configure.php5

 

dan tambahkan

--with-imap=/usr/local/php-imap \
--with-imap-ssl \

Lakukan recompile ulang

cd /usr/local/directadmin/custombuild
./build php n

Selesai, selamat mencoba

sumber : http://forum.directadmin.com/showthread.php?t=45434

Leave a Reply

Your email address will not be published. Required fields are marked *

What is 3 + 6 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

 

Wordpress SEO Plugin by SEOPressor