talyssonoc / react-laravel

Package for using ReactJS with Laravel
895 stars 90 forks source link

Error installing v8js #10

Closed tommymarshall closed 9 years ago

tommymarshall commented 9 years ago

I know this is only loosely related to your repo, but I thought getting an issue up would be a good reference for those of us debugging getting v8js installed.

Most of us use Laravel's Homestead vagrant box environment. I have a newly provisioned VM and, when I run the installation for v8js, I get the below error/output:

vagrant@homestead:~$ sudo pecl install v8js-beta
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading v8js-0.2.0.tgz ...
Starting to download v8js-0.2.0.tgz (87,387 bytes)
.....................done: 87,387 bytes
28 source files, building
running: phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
Please provide the installation prefix of libv8 [autodetect] :
building in /tmp/pear/temp/pear-build-rootqyPDSd/v8js-0.2.0
running: /tmp/pear/temp/v8js/configure --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-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -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
checking for PHP extension directory... /usr/lib/php5/20131226
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
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/temp/v8js/configure --with-v8js' failed

I ran pecl channel-update pecl.php.net, but the error persists. Any ideas?

talyssonoc commented 9 years ago

V8js depends on libv8, run sudo apt-get install libv8-dev libv8-dbg g++ cpp before installing it with pecl (source).

Say me if that worked !

Thanks for opening the issue, I'm gonna update it at the README !

tommymarshall commented 9 years ago

Thanks for the quick response! There must be something funky with the Vagrant Box, because:

vagrant@homestead:~$ sudo apt-get install libv8-dev libv8-dbg g++ cpp
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libv8-dbg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libv8-dbg' has no installation candidate

I installed libv8 using gem install libv8. That got me further into the process, then:

vagrant@homestead:~$ sudo apt-get install libv8-dev libv8-dbg g++ cpp
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libv8-dbg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libv8-dbg' has no installation candidate

vagrant@homestead:~$ sudo apt-get install libv8-dev g++ cppf
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package cppf

vagrant@homestead:~$ sudo apt-get install libv8-dev g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version.
libv8-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

But then I don't have libv8-dpg or cppf :/ #tears

talyssonoc commented 9 years ago

I'm not sure thar libv8-dbg is really necessary (gotta check it later and them update the REAME me again, sorry by the inconvenient).

And I guess you commited a typo there, it's cpp, not cppf !

Try just this: sudo apt-get install libv8-dev g++.

Edit:

Just installed it in homestead using sudo apt-get install libv8-dev g++ :D When asked for libv8 location, use /opt/v8.

koladei commented 6 years ago

Thank you so much. /opt/v8 is the path I have been looking for.

God bless you.

gempir commented 6 years ago

Any ideas what to do when /opt/v8 doesn't exist? I have all the packages installed.

koladei commented 6 years ago

Follow the steps in this article:

http://wiki.dreamfactory.com/DreamFactory/APT/Ubuntu_16.04/Modules/v8js

On Fri, Jul 20, 2018, 08:01 Daniel Pasch notifications@github.com wrote:

Any ideas what to do when /opt/v8 doesn't exist? I have all the packages installed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/talyssonoc/react-laravel/issues/10#issuecomment-406507818, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2FZgTEp8U1774-CtpcAoCCoYBsvyI5ks5uIYAxgaJpZM4D9SHl .