5

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
Maro
  • 77

2 Answers2

6

You receive the error because php5 is outdated.

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

cl-netbox
  • 31,491
Severus Tux
  • 10,126
3

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.

dymy
  • 31