Skip to content

Instantly share code, notes, and snippets.

@koriym
Last active September 25, 2020 06:35
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save koriym/cef916b3a9de5e9fea766f19ae17c1ad to your computer and use it in GitHub Desktop.
Save koriym/cef916b3a9de5e9fea766f19ae17c1ad to your computer and use it in GitHub Desktop.
How to install PHP 7.2 and V8Js on Ubuntu
apt update
apt upgrade
apt-get install python-software-properties
add-apt-repository -y ppa:ondrej/php 
add-apt-repository -y ppa:pinepain/libv8-archived
apt update
apt-get install php7.2 php7.2-curl php7.2-dev php7.2-mbstring php7.2-zip php7.2-mysql libv8-dev
pecl install v8js
echo 'extension=v8js.so' >> /etc/php/7.2/cli/conf.d/20-v8js.ini 
php -i | grep v8js

// confirmed with Ubuntu 16 and 17
@MicroDreamIT
Copy link

@joehoyle its complex to configure and v8js. I tried many many times but did not happen yet.

@p0ise
Copy link

p0ise commented Aug 17, 2019

The repository 'http://ppa.launchpad.net/pinepain/libv8-archived/ubuntu bionic Release' does nothave a Release file.

@gkweb
Copy link

gkweb commented Jun 26, 2020

Worth pointing out that libv8-dev is outdated now. You will need to compile a newer version of v8 in your system. See this: https://github.com/phpv8/v8js/blob/php7/README.Linux.md

Hope this helps someone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment