This article describes how to install phpv8js in CentOS. This article is a test note. if you need it, refer to CentOS release 5.11 (Final) and CentOS release 6.6 (Final) x64.
Gcc, glibc, and libstdc ++. so.6, gnu-binutils, tar, python, and re2c versions must all be correct. In the end, it is necessary to vomit blood. if glibc is required, it cannot be implemented, the risk is too high.
V8js is currently in the latest version 0.1.5beta, which cannot be implemented on CentOS5. dependencies of different versions cannot be implemented, so the old version is used.
Version:
The code is as follows:
Gcc-4.4.7, php-5.4, v8-3.15.5, python-2.7
Compile libv8.so
The code is as follows:
Wget https://github.com/v8/v8-git-mirror/archive/3.15.5.tar.gz
Cd v8-git-mirror-3.15.5/
Make dependencies
Make ia32.release library = shared-j4
Which of the following can be ignored?
The code is as follows:
Cp/root/software/v8-git-mirror-3.15.5/out/ia32.release/lib.tar get/libv8.so/usr/lib/
Cp/root/software/v8-git-mirror-3.15.5/include/v8 */usr/include/
Just do this: pecl install v8js-0.1.3
Note:
When gcc is installed, contrib/download_prerequisites can automatically download the required dependencies.
For a 64-bit system, yum install glibc-devel.i686 libstdc ++. i686 is required.
Make-j4 is compiled with four logical CPUs, which can speed up compilation, but may cause unstable internal errors and so on. just remove-j4. Do not use the-j parameter for your personal experience. it is easy to encounter nausea.
For a 64-bit system, if php is installed in yum, php is 64-bit. you need to compile the 64-bit libv8.so (make x64.release library = shared ).