如何在PHP5.5上安装V8js? [英] How to install V8js on PHP5.5?
问题描述
我想在Ubuntu 12.04上安装PHP5.5的v8js扩展,但无法使其正常工作.
当我尝试使用PECL安装v8js扩展版本0.2.0(最新)时,出现以下消息:
配置:错误:libv8必须为3.24.6或更高版本 错误:`/tmp/pear/temp/v8js/configure --with-v8js'失败
如果我尝试安装旧版本,则出现编译错误.此消息与我的问题非常相似:在ubuntu上为php安装v8js
如何解决此问题?
即使将PHPbrew降级到PHP 5.4,我也无法在使用PHP5.5的Ubuntu 14.04上安装它.但是,将Ubuntu 12.04与PHP 5.4结合使用非常有效.我没有尝试在Ubuntu 12.04上从PHP 5.5降级到5.4.
如果找不到libv8-dev
或libv8-dbg
,则可以通过运行命令找到正确的版本
~$ apt-cache search libv8
libv8-3.14-dbg - V8 JavaScript engine - debugging symbols
libv8-3.14-dev - V8 JavaScript engine - development files for 3.14 branch
libv8-3.14.5 - V8 JavaScript engine - runtime library
libv8-dev - V8 JavaScript engine - development files for latest branch
然后您可以运行
~$ sudo apt-get install libv8-3.14-dev libv8-3.14-dbg g++ cpp
然后您可以尝试通过运行pecl安装v8js
~$ sudo pecl install v8js-0.2.0
如果该命令返回这样的错误
configure: error: libv8 must be version 3.24.6 or greater
ERROR: `/tmp/pear/temp/v8js/configure --with-v8js' failed
您可以尝试运行
~$ sudo pecl install v8js-0.2.0
来安装v8js-0.1.3
~$ sudo pecl install v8js-0.1.3
然后编辑您的php.ini
以添加v8js
扩展名
~$ echo "extension=v8js.so" >> /etc/php5/cli/php.ini
I want to install the v8js extension for PHP5.5 on Ubuntu 12.04 but can't make it working.
When I try to install the v8js extension version 0.2.0 (latest) with PECL, I have this message:
configure: error: libv8 must be version 3.24.6 or greater ERROR: `/tmp/pear/temp/v8js/configure --with-v8js' failed
If I try to install an old version, I have a compilation error. This message is very similar to my issue: Install v8js for php on ubuntu
How can I fix this issue?
EDIT: I couldn't install it on Ubuntu 14.04 with PHP5.5, even with a PHP downgrade with PHPbrew to PHP 5.4. However, using Ubuntu 12.04 with PHP 5.4 works great. I didn't try the downgrade from PHP 5.5 to 5.4 on Ubuntu 12.04.
in case you can't find libv8-dev
or libv8-dbg
, you can find the correct version by run command
~$ apt-cache search libv8
libv8-3.14-dbg - V8 JavaScript engine - debugging symbols
libv8-3.14-dev - V8 JavaScript engine - development files for 3.14 branch
libv8-3.14.5 - V8 JavaScript engine - runtime library
libv8-dev - V8 JavaScript engine - development files for latest branch
then you can run
~$ sudo apt-get install libv8-3.14-dev libv8-3.14-dbg g++ cpp
then you can try to install v8js via pecl by running
~$ sudo pecl install v8js-0.2.0
if that command return error like this
configure: error: libv8 must be version 3.24.6 or greater
ERROR: `/tmp/pear/temp/v8js/configure --with-v8js' failed
you can try to install v8js-0.1.3
instead by running
~$ sudo pecl install v8js-0.1.3
then edit your php.ini
to add v8js
extension
~$ echo "extension=v8js.so" >> /etc/php5/cli/php.ini
这篇关于如何在PHP5.5上安装V8js?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!