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
  • I have the issue when trying to install cURL: sudo apt-get install php5-curl

    E: Unable to locate package php5-curl

    – Maro May 08 '16 at 08:46

2 Answers2

6

You receive the error because php5 is outdated.

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

cl-netbox
  • 31,163
  • 7
  • 94
  • 131
Severus Tux
  • 9,866
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