gpt4 book ai didi

ubuntu - 在 ubuntu 18.04 上安装 v8js

转载 作者:太空宇宙 更新时间:2023-11-03 17:05:31 25 4
gpt4 key购买 nike

我已经在我的本地机器上用 ubuntu 18.04 安装了 laravel homestead。我想在上面安装 v8js 我已经检查了一些教程,但我仍然不知道如何执行此操作。我通过

安装 v8js js
$ sudo pecl install v8js

我不知道在这个字段中输入什么所以我把它留给自动检测:请提供 libv8 [autodetect] 的安装前缀:

我收到以下日志和错误:

vagrant@autossr:/$ sudo pecl install v8js
PHP Warning: PHP Startup: Unable to load dynamic library 'v8js.so' (tried: /usr/lib/php/20170718/v8js.so (/usr/lib/php/20170718/v8js.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/v8js.so.so (/usr/lib/php/20170718/v8js.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading v8js-2.1.0.tgz ...
Starting to download v8js-2.1.0.tgz (101,553 bytes)
.......................done: 101,553 bytes
28 source files, building
running: phpize
Configuring for:
PHP Api Version: 20170718
Zend Module Api No: 20170718
Zend Extension Api No: 320170718
Please provide the installation prefix of libv8 [autodetect] :
building in /tmp/pear/temp/pear-build-rooth8NOvW/v8js-2.1.0
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/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20170718
checking for PHP installed headers prefix... /usr/include/php/20170718
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.0.1 (ok)
checking for gawk... gawk
checking for V8 Javascript Engine... yes, shared
checking for V8 files in default path... found in /usr
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for C standard version... c++11
checking how to allow c++11 narrowing... -Wno-narrowing
checking for libv8_libplatform... configure: error: could not find libv8_libplatform library
ERROR: `/tmp/pear/temp/v8js/configure --with-php-config=/usr/bin/php-config --with-v8js' failed

有安装方法吗?

最佳答案

在安装 php v8js 扩展之前,您需要先安装 v8 库。

我发现构建和安装 v8 库和 v8js 比使用 pecl 更容易。

我能够使用 this guide 做到这一点在 v8js github 上找到。

关于ubuntu - 在 ubuntu 18.04 上安装 v8js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53068951/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com