SoFunction
Updated on 2025-03-02

Tutorial for installing php v8js in CentOS

CentOS release 5.11 (Final), CentOS release 6.6 (Final) x64 test passed.

The gcc version, glibc version, libstdc++.so.6 version, gnu-binutils version, tar version, python version, and re2c version must be correct. In the end, it is necessary to vomit blood. If you need a higher version of glibc, it will not be possible. If you insist on doing it, it will be too risky.

v8js is currently the latest version of 0.1.5beta, which cannot be done on CentOS5. Various version dependencies cannot be solved, so they all use the old version.

Version:

Copy the codeThe code is as follows:

gcc-4.4.7,php-5.4,v8-3.15.5,python-2.7

Compilation
Copy the codeThe code is as follows:

wget /v8/v8-git-mirror/archive/3.15.
cd v8-git-mirror-3.15.5/
make dependencies
make library=shared -j4

The following should be ignored
Copy the codeThe code is as follows:

cp /root/software/v8-git-mirror-3.15.5/out/// /usr/lib/
cp /root/software/v8-git-mirror-3.15.5/include/v8* /usr/include/

Just do this: pecl install v8js-0.1.3

Notice:

When installing gcc, contrib/download_prerequisites can automatically download the required dependencies.
If it is a 64-bit system, you need yum install glibc-devel.i686 libstdc++.i686, etc.
make -j4 is compiled using 4 logical CPUs, which can speed up the compilation speed, but may not be stable and internal errors or the like occur. Just remove -j4. If you personally understand, don’t use the -j parameter, it is easy to encounter nausea problems.
If the 64-bit system is php installed in yum, then php is 64-bit, and 64-bit needs to be compiled (make library=shared).