# Cannot find imap library (libc-client.a) while compiling PHP71



## A.Ch (Jul 19, 2018)

Hello,

I am trying to compile imap into my php but I am facing this issue error everytime :

```
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
```

Would you please mention that how would I be able to add this library to my FreeBSD or in general solve this problem ?

Thank you in advanced


----------



## ShelLuser (Jul 19, 2018)

What FreeBSD version are you using and what PHP port are you trying to install?


----------



## A.Ch (Jul 19, 2018)

Thank you for your reply,

FreeBSD 11 and PHP71


----------



## SirDice (Jul 19, 2018)

Install mail/php71-imap.


----------



## A.Ch (Jul 20, 2018)

Thank you very much for your reply,

I also found this method for those who are using DirectAdmin:

1. 

```
pkg install imap-uw
```

2. add line to file: /usr/local/directadmin/custombuild/custom/fpm/configure.php71 

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

 3. 

```
cd /usr/local/directadmin/custombuild && ./build php
```

Regards


----------

