Ubuntu: E: Unable to locate package php5-imap



Question:

I am trying to install PHP imap on Ubuntu Server 16.

Following the steps on: php5-imap on Ubuntu 14.04 is not enabled

$ sudo apt-get install php5-imap    E: Unable to locate package php5-imap  


Solution:1

You receive the error because php5 is outdated.

Execute : sudo apt-get install php7.0-imap


Solution:2

I had to downgrade from PHP 7 to PHP 5.6, so I was following: How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04?

and applying general "naming convention" from that article I've tried:

sudo apt-get install -y php5.6-curl    

and it worked for me.
PS don't forget to run:

sudo systemctl restart apache2  

afterwards.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »