Установка v8js на Ubuntu 18.04 - PullRequest
0 голосов
/ 30 октября 2018

Я установил усадьбу laravel на свой локальный компьютер с Ubuntu 18.04. Я хочу установить на него v8js. Я проверил несколько уроков, но до сих пор точно не знаю, как это сделать. Я устанавливаю V8JS JS через

$ sudo pecl install v8js

Я не знаю, что печатать в этом поле, поэтому я оставляю его для автоопределения: Please provide the installation prefix of 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

Есть ли способ установить его?

1 Ответ

0 голосов
/ 07 декабря 2018

Перед установкой расширения php v8js необходимо сначала установить библиотеку v8.

Вместо того, чтобы вообще использовать pecl, я обнаружил, что проще просто собрать и установить библиотеку v8 и v8js.

Я смог сделать это, используя это руководство , найденное на v8js github.

...