Enable Shared Libraries for Python

I'm trying to install PostgreSQL with PL/Python server programming language on Ubuntu 16.04 LTS. When I run ./configure --with-python, I receive an error/warning asking for a shared python library. The PostgreSQL documentation knows that Ubuntu does not have this library shared by default, but doesn't provide info on how to set it up to work.

I tried installing python from source with ./configure --enable-shared, but when I try to run python I get an error loading my shared library. I don't remember the exact error message because I reset the server I was working on, but it was similar to the error encountered here. I can replicate the problem and get the exact error message if need be.

My question is: how do I properly setup my python shared library for my PostgreSQL installation to work?

4
Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article