Install Fails on pecl install v8js-1.4.1 - php

I have tried to install v8js on my ubuntu 16.04 for PHP/Symfony development.
I think I have installed all of requirements to install v8js, but it fails.
Based on the error, I will proper version of g++ should be installed on the machine.
So I have tried to install g++ by apt-get install g++, but I get another error as below.
root#localhost:~# echo '' | pecl install v8js-1.4.1
downloading v8js-1.4.1.tgz ...
Starting to download v8js-1.4.1.tgz (99,318 bytes)
......................done: 99,318 bytes
28 source files, building
running: phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
Please provide the installation prefix of libv8 [autodetect] : building in /tmp/pear/temp/pear-build-rootAP7rkZ/v8js-1.4.1
running: /tmp/pear/temp/v8js/configure --with-php-config=/usr/bin/php-config --with-v8js
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-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20151012
checking for PHP installed headers prefix... /usr/include/php/20151012
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 for V8 Javascript Engine... yes, shared
checking for V8 files in default path... found in /usr
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/tmp/pear/temp/pear-build-rootAP7rkZ/v8js-1.4.1':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
ERROR: `/tmp/pear/temp/v8js/configure --with-php-config=/usr/bin/php-config --with-v8js' failed
root#localhost:~# apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
g++ : Depends: g++-5 (>= 5.3.1-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Question is how am I need to install g++ or just how to install v8js on my machine.
I will put the output at installing
Can anyone help me please?

Related

Trouble Installing libsodium on Centos 6

I'm running CENTOS 6.7 and Apache and PHP 5.4.x. I'm using the EPEL and REMI repositories. I'm trying to install the libsodium extension.
It is my understanding that I need to install libsodium first, then the extension. Based on Googling, to get the right version, I ended on:
yum --enablerepo=remi install php54-php-pecl-libsodium
and I get the following result:
Installed:
php54-php-pecl-libsodium.x86_64 0:1.0.5-1.el6.remi
Dependency Installed:
audit-libs-python.x86_64 0:2.3.7-5.el6
environment-modules.x86_64 0:3.2.10-2.el6
libcgroup.x86_64 0:0.40.rc1-17.el6_7
libselinux-python.x86_64 0:2.0.94-5.8.el6
libsemanage-python.x86_64 0:2.0.43-5.1.el6
php54-php-common.x86_64 0:5.4.45-7.el6.remi
php54-runtime.x86_64 0:2.1-4.el6.remi
policycoreutils-python.x86_64 0:2.0.83-24.el6
setools-libs.x86_64 0:3.3.7-4.el6
setools-libs-python.x86_64 0:3.3.7-4.el6
tcl.x86_64 1:8.5.7-6.el6
Then I type in:
pecl install libsodium
and I get:
[root#core3 tmp]# pecl install libsodium
downloading libsodium-1.0.5.tgz ...
Starting to download libsodium-1.0.5.tgz (169,801 bytes)
.....................................done: 169,801 bytes
9 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
building in /var/tmp/pear-build-rootAHK93D/libsodium-1.0.5
running: /var/tmp/libsodium/configure --with-php-config=/usr/bin/php-config
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 for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for libsodium support... yes, shared
checking for libsodium files in default path... not found
configure: error: Please install libsodium - See https://github.com/jedisct1/libsodium
ERROR: `/var/tmp/libsodium/configure --with-php-config=/usr/bin/php-config' failed
You can see the error seems to indicate that libsodium is not installed when it is. Am I missing a step?
php54-php-pecl-libsodium is a SCL package (for parallel installation).
You probably need php-pecl-libsodium.
yum --enablerepo=remi install php-pecl-libsodium
You don't need to run the "pecl install comand".
It's been a while since I've installed a PECL module, but I believe that running the initial command would have taken care of installing the module, no need to run pecl manually after that.
Indeed, we can see that the file list from rpm shows the module installed along with a php.ini file to include it.
$ rpm -qlp http://rpms.famillecollet.com/store/php54/php/pecl/libsodium/1.0.5/php54-php-pecl-libsodium-1.0.5-1.el6.remi.x86_64.rpm
/opt/remi/php54/root/etc/php.d/libsodium.ini
/opt/remi/php54/root/usr/lib64/php/modules/libsodium.so
/opt/remi/php54/root/usr/share/doc/pecl/libsodium
/opt/remi/php54/root/usr/share/doc/pecl/libsodium/LICENSE
/opt/remi/php54/root/usr/share/doc/pecl/libsodium/README.md
/opt/remi/php54/root/var/lib/pear/pkgxml/php54-php-pecl-libsodium.xml
Did you make sure to restart your web server?

Error installing PDFlib

after much searching and testing classes and libraries that would generate a PDF from a html, give up and left to use PDFlib, by speaking it is more worked, but at least I know I must support the community.
But I'm stuck at the beginning.
I give the following command to install
pecl install pdflib
and it is giving error at the end:
downloading pdflib-3.0.4.tgz ...
Starting to download pdflib-3.0.4.tgz (27,043 bytes)
.........done: 27,043 bytes
7 source files, building
running: phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
path to pdflib installation? : /var/www/html/wordpress/wp-content/plugins/all-plugins-necessary
building in /tmp/pear/temp/pear-build-rootqJIDAR/pdflib-3.0.4
running: /tmp/pear/temp/pdflib/configure --with-pdflib=/var/www/html/wordpress/wp-content/plugins/all-plugins-necessary
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... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20121212
checking for PHP installed headers prefix... /usr/include/php5
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 for PDFlib support... yes, shared
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/tmp/pear/temp/pear-build-rootqJIDAR/pdflib-3.0.4':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
ERROR: `/tmp/pear/temp/pdflib/configure --with-pdflib=/var/www/html/wordpress/wp-content/plugins/all-plugins-necessary' failed
Can anyone help me telling what lack I install or configure?
EDIT:
As Chris said in the comments, it does indicate you do not have a c compiler installed.
sudo apt-get install g++
If it still doesn't work after installing g++, then try the below steps.
You may need to install the specific PHP PDFlib version downloaded directly from their site, then install via pecl.
http://www.pdflib.com/download/pdflib-family/pdflib-9/
Someone else resolved the problem this way, see the following post for full setup instructions:
PDF Lib install fail on linux server. Using pecl install pdflib

Unable to install ImageMagick in WHM/Cpanel (Amazon EC2)

I tried a lot of different solutions I could find all over the web but to no avail, I installed IMAGICK from WHM and it gave me the following:
downloading imagick-3.1.2.tgz ...
Starting to download imagick-3.1.2.tgz (94,657 bytes)
.....................done: 94,657 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
Please provide the prefix of Imagemagick installation [autodetect] : building in /root/tmp/pear/pear-build-rootUt1Zdv/imagick-3.1.2
running: /root/tmp/pear/imagick/configure --with-imagick
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 for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /usr/local/include/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 the imagick extension... yes, shared
checking whether to enable the imagick GraphicsMagick backend... no
checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
ERROR: `/root/tmp/pear/imagick/configure --with-imagick' failed
The imagick.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20131226
Tidying /usr/local/lib/php.ini...
No changes
Tidying /usr/local/cpanel/3rdparty/php/54/etc/php.ini...
No changes
I tried downloading the file and recompiling it too but nothing worked. Did I miss anything?
First run following commands
1. "WHM Home » Software » Rebuild RPM Database"
2. yum install ImageMagick ImageMagick-devel
3. yum install pcre-devel
Then go to
Go to WHM -> Software -> Module Installers -> PHP Pecl (manage). On the box below “Install a PHP Pecl” enter “imagick” and click “Install Now” button – that’s all. Restart Apache.
Above steps worked for me.
I think there is an issues with the path, Can you please try moving the compiled module from the "/usr/lib" location to the "/usr/local/lib" location and give a try now.

cannot install apn in php for ios push notifications on ubuntu

I am trying to run the command
sudo pecl install apn
But unable to install the apn please see http://libcapn.org/php-apn/
I am on ubuntu 14.4.
It gives following error
downloading apn-1.0.3.tgz ...
Starting to download apn-1.0.3.tgz (14,406 bytes)
.....done: 14,406 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
libcapn installation prefix [no] : yes
building in /tmp/pear/temp/pear-build-rootkK8px0/apn-1.0.3
running: /tmp/pear/temp/apn/configure --with-apn
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... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main - I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext - I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20121212
checking for PHP installed headers prefix... /usr/include/php5
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 for apn support... yes, shared
checking for PHP 5.3.0 or greater... 50509
checking for apn.h in default path... not found
configure: error: libcapn is not found. Please visit to http://www.libcapn.org/php-apn for more information
ERROR: `/tmp/pear/temp/apn/configure --with-apn' failed
I am not sure where to ask this question, so I am just asking here.
Thanks in advance.
Please tell if any other information is required.
I've just installed following this steps.
You need to install libcapn. Here you are the installation steps.
To install libcapn one of the requirements is CMake >= 2.8 then you have to install it first if you don't have it: apt-get install cmake.
By default libcapn is installed on /usr/local. I recommend don't change the installation path and when the apn installation prompt "libcapn installation prefix [no] : " you have to put this path.
Don't forget that you should add "extension=apn.so" to php.ini

Install ingres extension for PHP on a debian server

I've to work with a ingres database for my php server.
I just have one question:
I will never connect myself on an ingres server locally, is it still mandatory to install ingres locally to install ingres?
I tried to install ingres with PECL:
pecl install ingres
downloading ingres-2.2.2.tgz ...
Starting to download ingres-2.2.2.tgz (92,203 bytes)
.....................done: 92,203 bytes
10 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Ingres II_SYSTEM dir? [/opt/Ingres/IngresII] :
building in /var/tmp/pear-build-root/ingres-2.2.2
running: /tmp/pear/temp/ingres/configure --with-ingres=/opt/Ingres/IngresII
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... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20090626
checking for PHP installed headers prefix... /usr/include/php5
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... no
checking for nawk... nawk
checking if nawk is broken... no
checking for improved Ingres support... yes, shared
checking Use ingres2 as the extension name... no
configure: error: Cannot find iiapi.h under /opt/Ingres/IngresII/ingres/files - is $II_SYSTEM set?
ERROR: `/tmp/pear/temp/ingres/configure --with-ingres=/opt/Ingres/IngresII' failed
It gives me the impression that it tries to access to some ingres files.
Thank you!
The Ingres PHP extension is written using Ingres's OpenAPI interface. That API requires a local Ingres client be installed on the machine where you're making the connection from. In order to build the extension you need to have the II_SYSTEMenvironment variable setup, pointing to your local Ingres client. Once you have that you can run
sudo II_SYSTEM=${II_SYSTEM} pecl install ingres
or run through the steps outlined in http://svn.php.net/repository/pecl/ingres/trunk/README.html#unix
If you are logged in as root already, make sure II_SYSTEM is defined before executing:
pecl install ingres
You have to run it with root rights, because this extension tries to install into /opt/Ingres/IngresII folder.
So try to run sudo pecl install ingres

Categories