我曾尝试在我的ubuntu 16.04上安装v8js以进行PHP / Symfony开发。 我想我已经安装了所有安装v8js的要求,但它失败了。 基于错误,我将在机器上安装正确版本的g ++。 所以我试图通过apt-get install g ++安装g ++,但是我得到了另一个错误,如下所示。
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.
问题是我需要如何安装g ++或如何在我的机器上安装v8js。 我将输出安装在
有人可以帮我吗?