Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Install php7-devel

Discussion in 'EasyApache' started by bloom360, Jun 21, 2018.

  1. bloom360

    bloom360 Member

    Joined:
    Feb 23, 2015
    Messages:
    19
    Likes Received:
    3
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    I need to install a custom PHP extension. I am running PHP 7.1 on CentOS 7.5

    I tried to compile but I got the following errors:

    Code:
    checking if debug is enabled... no
    checking if zts is enabled... no
    checking for re2c... no
    configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate  
    I believe this means I need to install php7-devel, is this correct?

    To try my luck, I did:

    Code:
    yum install php7-devel
    but got:

    Code:
    No package php7-devel available.
    Any help would be greatly appreciated
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,870
    Likes Received:
    1,811
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @bloom360,

    Can you first verify which extension you are attempting to install, and the command(s) you are using to install it?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. bloom360

    bloom360 Member

    Joined:
    Feb 23, 2015
    Messages:
    19
    Likes Received:
    3
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hi @cPanelMichael

    It's a rather niche extension, surely nothing that you would have heard of. But in any case, here it is... I first downloaded it from Github, then patched it and then tried to phpize and install:

    Code:
    [root@vulcan sweph]# git clone https://github.com/Britskiy/php-sweph.git
    Cloning into 'php-sweph'...
    remote: Counting objects: 26, done.
    remote: Total 26 (delta 0), reused 0 (delta 0), pack-reused 26
    Unpacking objects: 100% (26/26), done.
    [root@vulcan sweph]# cd php-sweph
    [root@vulcan php-sweph]# patch -p1 < ../sweph-php7/sweph-php7.diff
    patching file sweph.c
    [root@vulcan php-sweph]# /opt/cpanel/ea-php71/root/usr/bin/phpize && ./configure   
    ... and got:

    Code:
    Configuring for:
    PHP Api Version:         20160303
    Zend Module Api No:      20160303
    Zend Extension Api No:   320160303
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for a sed that does not truncate output... /bin/sed
    checking for cc... cc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether cc accepts -g... yes
    checking for cc option to accept ISO C89... none needed
    checking how to run the C preprocessor... cc -E
    checking for icc... no
    checking for suncc... no
    checking whether cc understands -c and -o together... yes
    checking for system library directory... lib
    checking if compiler supports -R... no
    checking if compiler supports -Wl,-rpath,... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking target system type... x86_64-unknown-linux-gnu
    checking for PHP prefix... /opt/cpanel/ea-php71/root/usr
    checking for PHP includes... -I/opt/cpanel/ea-php71/root/usr/include/php -I/opt/                                  cpanel/ea-php71/root/usr/include/php/main -I/opt/cpanel/ea-php71/root/usr/includ                                  e/php/TSRM -I/opt/cpanel/ea-php71/root/usr/include/php/Zend -I/opt/cpanel/ea-php                                  71/root/usr/include/php/ext -I/opt/cpanel/ea-php71/root/usr/include/php/ext/date                                  /lib
    checking for PHP extension directory... /opt/cpanel/ea-php71/root/usr/lib64/php/                                  modules
    checking for PHP installed headers prefix... /opt/cpanel/ea-php71/root/usr/inclu                                  de/php
    checking if debug is enabled... no
    checking if zts is enabled... no
    checking for re2c... no
    configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate                                   PHP parsers.
    checking for gawk... gawk
    checking whether to enable sweph support... yes, shared
    checking for sweph files in default path... not found
    configure: error: Please reinstall the sweph distribution
     
  4. sktest123

    sktest123 Well-Known Member

    Joined:
    Jan 31, 2017
    Messages:
    99
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    kochin
    cPanel Access Level:
    Root Administrator
    the re2c is an independent package and could be installed with the steps at stackoverflow.com/questions/48220083/how-to-install-re2c-on-linux-centos-7
    or blog.csdn.net/jacson_bai/article/details/43604281
    WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers - CSDN博客 (just translate)
    the "sweph files not found " needs to dealt with wrong path directory , review code.google.com/archive/p/php-sweph/issues/3
    Google Code Archive - Long-term storage for Google Code Project Hosting
     
  5. bloom360

    bloom360 Member

    Joined:
    Feb 23, 2015
    Messages:
    19
    Likes Received:
    3
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Thank you so much, this solved my problem. Much appreciated.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,870
    Likes Received:
    1,811
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm glad to see that post helped. I've marked this thread as solved.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice