How to install APCu module on Plesk server?

Follow

Comments

13 comments

  • Avatar
    Dennis

    Hi,

    i've got this error, if i try to install APCu in CentOS7:

     

    [root@server ~]# /opt/plesk/php/7.2/bin/pecl install apcu
    WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-upd ate pecl.php.net" to update
    downloading apcu-5.1.12.tgz ...
    Starting to download apcu-5.1.12.tgz (105,890 bytes)
    ........................done: 105,890 bytes
    39 source files, building
    running: phpize
    Configuring for:
    PHP Api Version: 20100412
    Zend Module Api No: 20100525
    Zend Extension Api No: 220100525
    Enable internal debugging in APCu [no] : no
    building in /tmp/pear-build-rootSxUmme/apcu-5.1.12
    running: /tmp/apcu/configure --with-php-config=/usr/bin/php-config --enable-apcu -debug=no
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for cc... no
    checking for gcc... no
    configure: error: in `/tmp/pear-build-rootSxUmme/apcu-5.1.12':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details
    ERROR: `/tmp/apcu/configure --with-php-config=/usr/bin/php-config --enable-apcu- debug=no' failed

     

    Can anyone help? :)

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Dennis,

    The main error message part here is "configure: error: no acceptable C compiler found in $PATH".

    It means either you don't have gcc installed or it's not in your $PATH variable.

    To install gcc use this: (run as root)

    yum groupinstall "Development Tools"
    0
    Comment actions Permalink
  • Avatar
    suresh C

    hi

    In second point,

    Is this correct "plesk-php70-dev"

    Since I am getting error "unable to locate package plesk-php70-dev"

    My current php version is 5.6.37 in plesk for websites.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @surech C,

    As it is written in note for this article "As an example, Plesk PHP 7.0 development package is installed. For a different version of PHP change php70 to the required version, for instance, php56".

    In case you need to install the module for PHP 5.6, install package "plesk-php56-devel" instead of "plesk-php70-devel".

    1
    Comment actions Permalink
  • Avatar
    suresh C

    Thanks for the reply.

    0
    Comment actions Permalink
  • Avatar
    suresh C

    I entered root via ssh

    and typed 'plesk' to manage server.

    I typed 

    # apt install plesk-php-56dev zlib1g-dev gcc

    I am getting error       unable to locate package zlib1g

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @suresh C, please, let me know OS version you use.

    0
    Comment actions Permalink
  • Avatar
    suresh C

    hi Ivan

    The OS is ubuntu 16.04.5 LTS

    0
    Comment actions Permalink
  • Avatar
    suresh C

    I did these after ssh login

    Now working fine after putting 1 in zlib1g

    # apt install plesk-php-56dev zlib1g-dev gcc

    Given apcu full compatibilty-yes

    given internal debugging-no

    Tried 5th point, its not working. (Replaced php70 with php56) to restart. 

    7th point is working apcu-enabled

     

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @suresh C, thank you for sharing

    0
    Comment actions Permalink
  • Avatar
    Nikolai Graf-Rüssel

    Hi there,

    great tutorial, but I needed to install

    # apt-get install make gcc

    first, in order to work properly.

    thanks.

    0
    Comment actions Permalink
  • Avatar
    Carlo Angeletti

    Hi guys,

    i've a problem with php 7.3

    PHP Warning: PHP Startup: Unable to load dynamic library 'apcu.so' (tried: /opt/plesk/php/7.3/lib/php/modules/apcu.so (/opt/plesk/php/7.3/lib/php/modules/apcu.so: cannot open shared object file: No such file or directory), /opt/plesk/php/7.3/lib/php/modules/apcu.so.so (/opt/plesk/php/7.3/lib/php/modules/apcu.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
    downloading apcu-5.1.17.tgz ...
    Starting to download apcu-5.1.17.tgz (94,814 bytes)
    .....................done: 94,814 bytes

    Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in PEAR/PackageFile/v2/Validator.php on line 1933
    PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /opt/plesk/php/7.3/share/pear/PEAR/PackageFile/v2/Validator.php on line 1933
    39 source files, building
    running: phpize
    sh: phpize: command not found
    ERROR: `phpize' failed

     

    With php7.2 i've no problem

     

    Someone can help me?

    0
    Comment actions Permalink
  • Avatar
    Maxim Krasikov (Edited )

    Hello @Carlo Angeletti,

    The error reported caused by missing package plesk-php73-dev. Please install the package:
    For Ubuntu, Debian:

    # apt install plesk-php73-dev zlib1g-dev gcc

    For CentOS, RHEL:

    # yum install plesk-php73-devel zlib-devel gcc


    After this step, proceed with the module installation.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request