如何为 ubuntu 12.04 安装 v8js?
我看到了以下问题: 在 Ubuntu 上安装 PHPv8js
当我为 php 5.4.23 使用编译版本 v8js-0.1.3 时,出现错误:
/usr/lib/php5/20100525# php -m | grep v8js
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/v8js.so' - /usr/lib/php5/20100525/v8js.so: undefined symbol: _ZN2v87Integer3NewEi in Unknown on line 0
可能的原因:它为 php 5.3 (20090626) 编译了 v8js。我将它用于 php 5.4 (20100525)。
通过 gcc4.8 编译 v8js-0.1.5 时出现错误:
running: make
/bin/bash /tmp/pear/temp/pear-build-rootHtv6O2/v8js-0.1.5/libtool --mode=compile g++ -std=c++11 -I. -I/tmp/pear/temp/v8js -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootHtv6O2 /v8js-0.1.5/include -I/tmp/pear/temp/pear-build-rootHtv6O2/v8js-0.1.5/main -I/tmp/pear/temp/v8js -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 -DHAVE_CONFIG_H -c /tmp/pear/temp/v8js/v8js.cc -o v8js.lo
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make: *** [v8js.lo] Ошибка 1
ERROR: `make' failed
通过 gcc 4.7:
running: make
...
/usr/include/v8.h:5091:24: note: v8::Context::Scope::Scope(v8::Handle<v8::Context>)
/usr/include/v8.h:5091:24: note: no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'v8::Handle<v8::Context>'
/usr/include/v8.h:5089:9: note: constexpr v8::Context::Scope::Scope(const v8::Context::Scope&)
/usr/include/v8.h:5089:9: note: no known conversion for argument 1 from 'v8::Persistent<v8::Context>' to 'const v8::Context::Scope&'
/tmp/pear/temp/v8js/v8js.cc:1103:32: error: 'GetCurrent' is not a member of 'v8::Context'
/tmp/pear/temp/v8js/v8js.cc:1106:21: error: 'NewSymbol' is not a member of 'v8::String'
make: *** [v8js.lo] Ошибка 1
ERROR: `make' failed
我怎样才能正确安装它?谢谢。