yum install php-imap fails

General support questions
Post Reply
helmut
Posts: 3
Joined: 2014/08/14 01:24:49

yum install php-imap fails

Post by helmut » 2014/08/14 01:30:07

a software I'm trying to install requires php-imap,
but in CentOS 7 it seems to fail with the message
"Warning: No matches found for: php-imap"
is it available?
where?

helmut
Posts: 3
Joined: 2014/08/14 01:24:49

Re: yum install php-imap fails

Post by helmut » 2014/08/14 08:06:56

i didn't find any package. but i figured it out how to add it myself:
  • download imap source code:

    Code: Select all

    wget ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz
  • make imap happen:

    Code: Select all

    tar xvzf imap-2007f.tar.gz
    pushd imap-2007f
    make lfd EXTRACFLAGS=-fPIC IP6=4
    sudo cp -vi c-client/*.h /usr/local/include/
    sudo cp -vi c-client/*.c /usr/local/lib/
    popd
  • download matching php source code (currently PHP 5.4.16):

    Code: Select all

    wget http://museum.php.net/php5/php-5.4.16.tar.gz
  • make php-imap happen:

    Code: Select all

    tar xvzf php-5.4.16.tar.gz
    pushd php-5.4.16/ext/imap/
    phpize
    ./configure --with-imap --with-kerberos --with-imap-ssl
    make
    sudo cp -vi modules/imap.so /usr/lib64/php/
    popd
    sudo echo "extension=imap.so" > /etc/php.d/imap.ini
  • restart httpd:

    Code: Select all

    sudo service httpd restart
that added php-imap functionality to my CentOS 7 installation.
and it works well

:D

Maska
Posts: 2
Joined: 2014/07/21 13:41:12

Re: yum install php-imap fails

Post by Maska » 2014/08/14 09:03:19

you can install it from epel repo

Code: Select all

wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm -O /tmp/epel-release.rpm
rpm -i /tmp/epel-release.rpm
yum -y install php-imap
Last edited by Maska on 2014/08/14 10:06:05, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: yum install php-imap fails

Post by TrevorH » 2014/08/14 09:49:28

Installing from source on a package based distro is not a good idea.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

helmut
Posts: 3
Joined: 2014/08/14 01:24:49

Re: yum install php-imap fails

Post by helmut » 2014/08/14 21:07:07

Maska wrote:you can install it from epel repo
Thanks, that worked :)

lauriek334
Posts: 1
Joined: 2015/02/05 14:56:45

Re: yum install php-imap fails

Post by lauriek334 » 2015/02/05 15:16:56

Yes the download and install from the epel repository works. As Centos 7 has now been released, the updated url for the rpm is:

Code: Select all

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: yum install php-imap fails

Post by TrevorH » 2015/02/05 15:32:57

You no longer need such complex methods: just yum --enablerepo=extras install epel-release now works.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply