如何安装 v8js ubuntu

问题描述

我想为 PHP 安装 v8js 扩展,当我尝试使用此命令安装它时 pecl install v8js 它在终端显示此日志:

WARNING: channel "pecl.PHP.net" has updated its protocols,use "pecl channel-update pecl.PHP.net" to update
downloading v8js-2.1.2.tgz ...
Starting to download v8js-2.1.2.tgz (102,977 bytes)
........................done: 102,977 bytes
28 source files,building
running: PHPize
Configuring for:
PHP Api Version:         20200930
Zend Module Api No:      20200930
Zend Extension Api No:   420200930
Please provide the installation prefix of libv8 [autodetect] : 

而且我不知道日志 Please provide the installation prefix of libv8 [autodetect] : 的最后一行是什么意思,所以我尝试通过按 Enter 键跳过它并继续该过程并显示此日志:

building in /tmp/pear/install/pear-build-mohamedM5SIGk/v8js-2.1.2
running: /tmp/pear/install/v8js/configure --with-PHP-config=/usr/bin/PHP-config --with-v8js
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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 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/20200930 -I/usr/include/PHP/20200930/main -I/usr/include/PHP/20200930/TSRM -I/usr/include/PHP/20200930/Zend -I/usr/include/PHP/20200930/ext -I/usr/include/PHP/20200930/ext/date/lib
checking for PHP extension directory... /usr/lib/PHP/20200930
checking for PHP installed headers prefix... /usr/include/PHP/20200930
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for V8 Javascript Engine... yes,shared
checking for V8 files in default path... not found
configure: error: Please reinstall the v8 distribution
ERROR: `/tmp/pear/install/v8js/configure --with-PHP-config=/usr/bin/PHP-config --with-v8js' Failed

但它显示错误

configure: error: Please reinstall the v8 distribution
    ERROR: `/tmp/pear/install/v8js/configure --with-PHP-config=/usr/bin/PHP-config --with-v8js' Failed

所以我尝试安装 v8 引擎以使用此命令 apt-get install libv8-dev 解决此问题,但它显示此日志:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note,selecting 'libnode-dev' instead of 'libv8-dev'
libnode-dev is already the newest version (12.21.0~dfsg-3ubuntu1).
0 upgraded,0 newly installed,0 to remove and 40 not upgraded.

任何在 ubuntu 上正确安装 v8js 的帮助!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...