- Install and configure Postgres [https://library.linode.com/databases/postgresql/ubuntu-12.04-precise-pangolin]
- Download latest stable version of plv8 [https://code.google.com/p/plv8js/wiki/PLV8]
- Extract plv8.zip and cd into it.
- sudo apt-get install subversion
- sudo make static
- Copy plv8.so to /usr/lib/postgres/9.1/lib
- Copy plv8--(version).sql and plv8.control to /usr/share/postgres/9.1/extension
- psql -d dbName
- CREATE EXTENSION plv8;
- Repeat 6-8 for plls (livescript) and plcoffee (coffeescript) if required
Created
June 1, 2013 15:56
-
-
Save asleepysamurai/5690830 to your computer and use it in GitHub Desktop.
Install plv8 on Ubuntu
Has anyone been able to install on Ubuntu 22.04? If so, a guide?
for postgres 16
sudo apt install libtinfo5 build-essential pkg-config libstdc++-12-dev cmake git postgresql-server-dev-16
git clone https://github.com/plv8/plv8
cd plv8
git checkout tags/v3.2.2
make
sudo make install
@thanderoy I know this is kinda too late for you, I shared it for others since this gist is pretty high ranking on google search.
@ArjixWasTaken Too late but thanks. For posterity now. 😄 💪
@ArjixWasTaken thank you very much; successful make plv8
lightening@lightening-virtual-machine:~/Work/bustabit/webserver/plv8$ make
g++ -DJSONB_DIRECT_CONVERSION -Ideps/v8-cmake/v8/include -std=c++17 -Wall -std=c++17 -fno-rtti -O2 -fPIC -Wall -Wno-register -xc++ -I. -I./ -I/usr/include/postgresql/17/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -fPIC -c -o plv8.o plv8.cc
In file included from plv8.cc:8:
plv8.h:20:10: fatal error: postgres.h: No such file or directory
20 | #include "postgres.h"
| ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:91: plv8.o] Error 1
Can anyone help with this issue?
Please give me some advice.
@bestpractice116 you need to install the dev headers for postgres, if you are on debian/ubuntu you can install postgresql-server-dev-16
for postgres 16
sudo apt install postgresql-server-dev-16,16 is your PG version.
… 2025年6月5日 01:20,Paul Breen ***@***.***> 写道:
@bestpractice116 commented on this gist.
***@***.***:~/Work/bustabit/webserver/plv8$ make
g++ -DJSONB_DIRECT_CONVERSION -Ideps/v8-cmake/v8/include -std=c++17 -Wall -std=c++17 -fno-rtti -O2 -fPIC -Wall -Wno-register -xc++ -I. -I./ -I/usr/include/postgresql/17/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -fPIC -c -o plv8.o plv8.cc
In file included from plv8.cc:8:
plv8.h:20:10: fatal error: postgres.h: No such file or directory
20 | #include "postgres.h"
| ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:91: plv8.o] Error 1
Can anyone help with this issue?
Please give me some advice.
—
Reply to this email directly, view it on GitHub <https://gist.github.com/asleepysamurai/5690830#gistcomment-5605529> or unsubscribe <https://github.com/notifications/unsubscribe-auth/A5A6TWCGFK5XYPM4NM5ZLUD3B4TE5BFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFU42TMOJQHAZTBJ3UOJUWOZ3FOKTGG4TFMF2GK>.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Has anyone been able to install on Ubuntu 22.04? If so, a guide?