Skip to content

Instantly share code, notes, and snippets.

@danielleevandenbosch
Last active April 19, 2024 20:52
Show Gist options
  • Save danielleevandenbosch/e35c6a36da3f23a86f74a4450975ce3f to your computer and use it in GitHub Desktop.
Save danielleevandenbosch/e35c6a36da3f23a86f74a4450975ce3f to your computer and use it in GitHub Desktop.
Connect_postgres_to_pervasive_database
sudo apt update
sudo apt install software-properties-common
sudo apt-add-repository 'deb http://ftp.de.debian.org/debian sid main' #https://packages.debian.org/sid/amd64/openjdk-8-jdk/download -- you can change to another mirror here
sudo apt update --allow-unauthenticated
sudo apt install openjdk-8-jdk 
java -version
echo "export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac))))" | sudo tee -a /etc/profile
source /etc/profile
echo $JAVA_HOME
sudo apt install git
git clone https://github.com/pgspider/jdbc_fdw.git
cd jdbc_fdw
sudo apt install postgresql-server-dev-all build-essential
-- this all worked up to here. there might be an issue because we have previously installed postgres 15 and the thing wanted 16
sudo find /usr/lib /usr/local/lib -name libjvm.so
export LD_LIBRARY_PATH=/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/aarch64/server:$LD_LIBRARY_PATH
use vim and add the following to the make file (don't include the quotes) "LDFLAGS += -L/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/aarch64/server"
sudo apt-get install postgresql-server-dev-15 #if you are runing version 15
export PG_CONFIG=/usr/bin/pg_config  # Adjust if your pg_config is located elsewhere eg: export PG_CONFIG=/usr/lib/postgresql/15/bin/pg_config
# you can find the file using find /usr -name pg_config
make clean
make USE_PGXS=1
sudo make USE_PGXS=1 install
ls /usr/share/postgresql/15/extension/


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