Control Web Panel

WebPanel => CentOS-WebPanel Bugs => Topic started by: n8v8r on January 22, 2018, 12:18:17 PM

Title: php7.x installation fails
Post by: n8v8r on January 22, 2018, 12:18:17 PM

Linux  3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.4.1708 (Core)
x86_64
mysql  Ver 15.1 Distrib 10.1.30-MariaDB, for Linux (x86_64) using readline 5.1
Apache 2.4
PHP 5.6.30 (cli) (built: Jan 28 2017 14:24:05)
Zend Engine v2.6.0 with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.8

CWP version: 0.9.8.427

from the installation log:
Quote
checking for libzip... not found
configure: error: Please reinstall the libzip distribution
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.

Code: [Select]
yum install libzip
Quote
Package libzip-0.10.1-8.el7.x86_64 already installed and latest version
Nothing to do


Title: Re: php7.x installation fails
Post by: n8v8r on January 26, 2018, 10:34:16 PM
still happening with CWPpro version: 0.9.8.436

Quote
tail -f /var/log/php-dependencies.log
Package libjpeg-turbo-devel-1.2.90-5.el7.x86_64 already installed and latest version
Package libcurl-devel-7.29.0-42.el7_4.1.x86_64 already installed and latest version
Package krb5-devel-1.15.1-8.el7.x86_64 already installed and latest version
Package krb5-libs-1.15.1-8.el7.x86_64 already installed and latest version
Package expat-devel-2.1.0-10.el7_3.x86_64 already installed and latest version
Nothing to do

Quote
tail -f /var/log/php-selector-rebuild.log
checking libzip... yes
checking for the location of zlib... /usr
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libzip... not found
configure: error: Please reinstall the libzip distribution
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
Title: Re: php7.x installation fails
Post by: bullten on January 29, 2018, 10:05:30 PM
did you try

yum install  libzip-devel -y
Title: Re: php7.x installation fails
Post by: n8v8r on January 30, 2018, 06:06:22 PM
Still the same with CWPpro version: 0.9.8.438, then after the installation of libzip-devel the log reports

Quote
checking libzip... yes
checking for the location of zlib... /usr
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libzip... configure: error: system libzip must be upgraded to version >= 0.11
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
Title: Re: php7.x installation fails
Post by: bullten on January 30, 2018, 06:13:30 PM
which php 7 version you are trying to compile?
Title: Re: php7.x installation fails
Post by: n8v8r on January 30, 2018, 06:21:45 PM
7.x
(https://s18.postimg.org/rvfefls2h/image.png)
Title: Re: php7.x installation fails
Post by: bullten on January 30, 2018, 06:24:29 PM
Try

Quote
wget https://cmake.org/files/v3.10/cmake-3.10.2.tar.gz
tar zxvf cmake-3.10.2.tar.gz
cd cmake-3.10.2
./bootstrap
make
make install

Quote
wget https://libzip.org/download/libzip-1.4.0.tar.gz
tar zxvf libzip-1.4.0.tar.gz
cd libzip-1.4.0
mkdir build
cd build
/usr/local/bin/cmake ..
make
make test
make install
Title: Re: php7.x installation fails
Post by: bullten on January 30, 2018, 07:27:59 PM
Dont forget to remove libzip before installation :)

Quote
rpm -e --nodeps libzip-devel.x86_64
rpm -e --nodeps libzip.x86_64
Title: Re: php7.x installation fails
Post by: n8v8r on January 30, 2018, 08:50:12 PM
Thanks for the effort/input which brought the PHP installation a step further but still not to its end, I am afraid

Quote
checking libzip... yes
checking for the location of zlib... /usr
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libzip... in default path: found in /usr/local
checking for zip_open in -lzip... yes
checking for zip_file_set_encryption in -lzip... yes
checking for zip_libzip_version in -lzip... yes
checking stdbool.h usability... yes
checking stdbool.h presence... yes
checking for stdbool.h... yes
checking fts.h usability... yes
checking fts.h presence... yes
checking for fts.h... yes
checking for int8_t... (cached) yes
checking for int16_t... (cached) yes
checking for int32_t... (cached) yes
checking for int64_t... (cached) yes
checking for uint8_t... (cached) yes
checking for uint16_t... (cached) yes
checking for uint32_t... (cached) yes
checking for uint64_t... (cached) yes
checking for ssize_t... yes
checking size of short... (cached) 2
checking size of int... (cached) 4
checking size of long... (cached) 8
checking size of long long... (cached) 8
checking size of off_t... 0
configure: error: off_t undefined; check your library configuration
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
Title: Re: php7.x installation fails
Post by: bullten on January 30, 2018, 09:05:30 PM
I just installed the same way I told you.

what is output of cat /etc/ld.so.conf
Title: Re: php7.x installation fails
Post by: n8v8r on January 30, 2018, 09:23:59 PM
Quote
include ld.so.conf.d/*.conf
Title: Re: php7.x installation fails
Post by: bullten on January 30, 2018, 09:30:11 PM
nano /etc/ld.so.conf
add
Quote
/usr/local/lib/
run
ldconfig

Then try re installation again :)
Title: Re: php7.x installation fails
Post by: n8v8r on January 30, 2018, 09:32:07 PM
could this be related?

Quote
NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/zip.so' - libzip.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
Title: Re: php7.x installation fails
Post by: bullten on January 30, 2018, 09:44:31 PM
See if above solution helps you.
Title: Re: php7.x installation fails
Post by: n8v8r on January 30, 2018, 09:57:09 PM
indeed, it sorted the matter and 7.x is now installed  8)

But boy, this jumping a lot of hoops. Since 7.x is listed in the php selection one would expect that by installing the dependencies and then clicking the install button would be it.

Should 7.x not better be removed from the menu or else the necessary libraries for it included in the dependencies installer?
Title: Re: php7.x installation fails
Post by: n8v8r on January 31, 2018, 04:13:17 AM
Could the switch of the libzip libraries have messed up PHP-FPM? I am now getting this warning which I do not recall happening prior to the switch
Quote
NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/zip.so' - libzip.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
The file zip.so is available in named location but perhaps it got upgraded to a version that PHP-FPM cannot handle? If so how to revert/uninstall rpm libzip-1.4.0?
Title: Re: php7.x installation fails
Post by: bullten on January 31, 2018, 06:50:43 AM
Hello,

I dont think that would cause issue.
Title: Re: php7.x installation fails
Post by: n8v8r on January 31, 2018, 07:02:05 AM
Nonetheless the issue is there and though I cannot be 1oo% sure ti seems related and would prefer PHP-FPM not having any issues. Either get PHP-FPM to recognize the available files or revert/downgrade the libzip library and see whether it heals the matter.

Is there an uninstall script for safe removal, assuming that there are systemlinks as shared library in place?
Title: Re: php7.x installation fails
Post by: bullten on January 31, 2018, 08:41:26 AM
May i know how I can replicate the issue?
Title: Re: php7.x installation fails
Post by: n8v8r on January 31, 2018, 09:00:36 AM
Not sure, my system specification are posted and we went (with thanks) that far as to get the PHP7.x resources compiled/installed. As I said I cannot be 100% sure but prior this exercise PHP-FPM did not report this. The file in question is present
(https://s10.postimg.org/6uz5tztc9/zip.so.png)

reading the error it seems that zip.so is calling another dependency (zip.so' - libzip.so.2), which may not be present on the system but might have prior installing libzip 1.4, or might have different path or call routine than PHP-FPM is expecting.

Title: Re: php7.x installation fails
Post by: bullten on January 31, 2018, 09:19:11 AM
ok then do

yum install libzip
Title: Re: php7.x installation fails
Post by: n8v8r on January 31, 2018, 10:19:37 AM
do I not have to remove libzip1.4 first to avoid any conflict, or shall there be none?
Title: Re: php7.x installation fails
Post by: bullten on January 31, 2018, 10:24:50 AM
Just install it and check.
Title: Re: php7.x installation fails
Post by: n8v8r on January 31, 2018, 10:27:52 AM
done and the error is gone, php-fpm reporting no issues.

I just hope there will be no confusion/confilcts between the versions
Title: Re: php7.x installation fails
Post by: n8v8r on February 12, 2018, 03:46:30 AM
cross reference http://forum.centos-webpanel.com/centos-7-problems/install-php7-x-php-selecto/
Title: Re: php7.x installation fails
Post by: mozaffar on November 06, 2019, 10:04:45 AM
Use these commands to install proper version of libzip:

yum remove libzip libzip devel
rpm -ihf http://packages.psychotic.ninja/7/plus/x86_64/RPMS//libzip-0.11.2-6.el7.psychotic.x86_64.rpm (http://packages.psychotic.ninja/7/plus/x86_64/RPMS//libzip-0.11.2-6.el7.psychotic.x86_64.rpm)
rpm -ihf http://packages.psychotic.ninja/7/plus/x86_64/RPMS//libzip-devel-0.11.2-6.el7.psychotic.x86_64.rpm (http://packages.psychotic.ninja/7/plus/x86_64/RPMS//libzip-devel-0.11.2-6.el7.psychotic.x86_64.rpm)