I'm trying to install Thrift with PHP to my CentOS machine. Here's what I do and what goes wrong:
[root#x3430-20371 YACassandraPDO]# rpm -Uvh http://rpm.sys.fm/centos/6/x86_64/thrift-php-0.9.0-1.el6.x86_64.rpm
Retrieving http://rpm.sys.fm/centos/6/x86_64/thrift-php-0.9.0-1.el6.x86_64.rpm
error: Failed dependencies:
php(zend-abi) = 20090626 is needed by thrift-php-0.9.0-1.el6.x86_64
php(api) = 20090626 is needed by thrift-php-0.9.0-1.el6.x86_64
[root#x3430-20371 YACassandraPDO]# php -v
PHP 5.4.25 (cli) (built: Feb 18 2014 14:20:14)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
Maybe you guys have any ideas how to fix it. Thanks!
Also when I'm building from Thrift source, I get this error:
[root#x3430-20371 thrift]# ./bootstrap.sh
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
configure.ac:89: installing `./config.guess'
configure.ac:89: installing `./config.sub'
configure.ac:26: installing `./install-sh'
configure.ac:26: installing `./missing'
compiler/cpp/Makefile.am: installing `./depcomp'
configure.ac: installing `./ylwrap'
lib/cpp/test/Makefile.am:178: variable `concurrency_test_SOURCES' is defined but no program or
lib/cpp/test/Makefile.am:178: library has `concurrency_test' as canonical name (possible typo)
lib/cpp/test/Makefile.am:187: variable `processor_test_SOURCES' is defined but no program or
lib/cpp/test/Makefile.am:187: library has `processor_test' as canonical name (possible typo)
lib/cpp/test/Makefile.am:195: variable `processor_test_LDADD' is defined but no program or
lib/cpp/test/Makefile.am:195: library has `processor_test' as canonical name (possible typo)
lib/cpp/test/Makefile.am:184: variable `concurrency_test_LDADD' is defined but no program or
lib/cpp/test/Makefile.am:184: library has `concurrency_test' as canonical name (possible typo)
[root#x3430-20371 thrift]#
Related
I currently have php72 installed on amazon linux one.
[ehost ~]$ php -v
PHP 7.2.11 (cli) ( built: Oct 16 2018 23:50:44) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
When I attempt to install a custom rpm I get the following.
How do I let the rpm know that PHP 7.2 is already installed?
Error: Package: mct_console-3.40.1-
6624_f7150d48.noarch (/mct_console-
3.40.1-6624_f7150d48.noarch)
Requires: php >= 7.0.2
Available: php-5.3.29-
1.8.amzn1.x86_64 (amzn-main)
Another Error:
Error: Package: mct_console-3.40.1-
6624_f7150d48.noarch (/mct_console-
3.40.1-6624_f7150d48.noarch)
Requires: php-mysql >= 7.0.2
Available: php-mysql-5.3.29-
1.8.amzn1.x86_64 (amzn-main)
The packages php and php72 are two separate packages. You have one called php but it's only 5.3.29. If that's your only dependency that is missing, you can do rpm -i --nodeps to get around it.
However, whatever tool you are trying to install will need to have the PATH fixed in whatever you are currently doing it to change the default php executable to be the 7.2 one.
I have High Sierra OS - Version 10.13.6
PHP Version: PHP 7.1.9
when I try to do command php -v always appear error like this:
PHP Startup: Unable to load dynamic library
'/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so'
- dlopen(/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so,
9): Library not loaded:
/usr/local/opt/imagemagick/lib/libMagickWand-7.Q16HDRI.5.dylib
Referenced from:
/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so
Reason: image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library
'/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so'
- dlopen(/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so,
9): Library not loaded:
/usr/local/opt/imagemagick/lib/libMagickWand-7.Q16HDRI.5.dylib
Referenced from:
/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so
Reason: image not found in Unknown on line 0 PHP 7.1.9 (cli) (built:
Sep 14 2017 10:05:35) ( NTS ) Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.9, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.5.3, Copyright (c) 2002-2017, by Derick Rethans
AFAIK, my php.ini failed to load imagick library.
I already install Imagick with brew,
there is a file imagick.so inside folder /usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/.
I already search many sources for this issue, I found many similar issues too in StackOverflow, it seems similar to mine but still not fixed my issue.
I can still run PHP script obviously, but cannot do some manipulation image with Imagick.
Try:
sudo pecl uninstall imagick && sudo pecl install imagick
For debugging I suggest you move the dep to a folder easy to debug, such as in /User/<you>/Documents/. You can load it from the absolute path:
extention="/User/<you>/Documents/<project and check if it's a path issue.
I think that you are trying to install the dependency that is older than the current version of PHP, because you are loading the extention from php56 but you are using php71
https://stackoverflow.com/a/50529784/5893008
After one of PHP updates (ubuntu) I got an error Class 'AMQPConnection' not found in my application.
I reinstalled latest stable version (1.7.1) of amqp via pecl
sudo pecl uninstall amqp
sudo pecl install amqp
It asks me:
downloading amqp-1.7.1.tgz ...
Starting to download amqp-1.7.1.tgz (79,905 bytes)
..................done: 79,905 bytes
18 source files, building
running: phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
Set the path to librabbitmq install prefix [autodetect] :
When I choose one of the variants - builds fails, error always like
configure: error: Please reinstall the librabbitmq distribution itself or (re)install librabbitmq development package if it available in your system
ERROR: `/tmp/pear/temp/amqp/configure --with-librabbitmq-dir=20121113' failed
If I choose autodetect, installation proccessed successfully.
Then I add extension=amqp.so into php.ini and get an error
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/amqp.so' - /usr/lib/php5/20131226/amqp.so: cannot open shared object file: No such file or directory in Unknown on line 0
I found amqp.so via
locate amqp.so
It display
/usr/lib/php5/20121212/amqp.so
Then I change extension=amqp.so to the full path /usr/lib/php5/20121212/amqp.so
And I get very interesting error
PHP Warning: PHP Startup: amqp: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0
As I understand, PHP compiled with version newest than Amqp.
But it is the latest amqp library version.
Pecl shows:
Package Stable/(Latest) Local
amqp 1.7.1 (stable) 1.7.1 Communicate with any AMQP compliant server
PHP version is 5.6.4
PHP 5.6.4-4ubuntu6 (cli) (built: Apr 17 2015 15:47:51)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend
Technologies
with Xdebug v2.2.6, Copyright (c) 2002-2014, by Derick Rethans
I found so many questions here but whatever i try i always get the msg
No package php-opcache available
i tried to follow this
http://www.unixmen.com/install-remi-repository-rhel-centos-scientific-linux-76-x5-x-fedora-201918/
then install opcache
# yum install php-opcache
but still no luck
PS: i have WHM/Cpanel installed on my AWS server and i need to install opcache for Magento
i have PHP version 5.5
PHP 5.5.35 (cgi-fcgi) (built: May 16 2016 18:26:28)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
i tried to enable it from php.ini but it says opcache.so not found
any help would be appreciated
Failed loading /usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so: /usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so: cannot open shared object file: No such file or directory
If you're installing from Remi's repo, the name will be php55-php-opcache, which you could have determined from running yum search opcache.
But your error refers to /usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so which tells me that you have a version of PHP that was compiled from source. You need to either use packages or compile from source, not both. If you install from a package, things will not be put into /usr/local/.
I just upgraded to php 5.6.4. When i do pear installs of various packages it complains that if have a module mismatch.
example:
sudo pecl install xdebug
Failed loading /usr/local/php-5.6.4/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so:
/usr/local/php-5.6.4/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so: undefined symbol: zend_execute_ex
Zend OPcache requires Zend Engine API version 220131226.
The Zend Engine API version 220100525 which is installed, is outdated.
PHP Warning: PHP Startup: PDFlib: Unable to initialize module
Module compiled with module API=20131226
PHP compiled with module API=20100525
However, 20131226 is php 5.6.4, 20100525 is 5.4 i believe. So oddly pear thinks the modules were compiled w/ 5.6 but the version of php is 5.4. Ive had this the other way around where the module is older than the php version a lot and typically just recompile those module. this one im a bit stumped.
[richv]$ php -v
PHP 5.6.4 (cli) (built: Jun 16 2015 16:08:30)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
with Xdebug v2.3.2, Copyright (c) 2002-2015, by Derick Rethans
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
[richv]$ pear version
PEAR Version: 1.9.5
PHP Version: 5.6.4
Zend Engine Version: 2.6.0
Running on: Linux dragon 3.10.0-229.4.2.el7.x86_64 #1 SMP Wed May 13 10:06:09 UTC 2015 x86_64
If you still have the old php version lying around, then pear/pecl probably still uses this php version - even if it shows the correct php version in pear version.
Try to change the php_bin pear config setting:
$ pear config-show
..
$ pear config-set php_bin /path/to/new/php