Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have installed the build tools and the postgresql devel packages with:

sudo apt-get update & sudo apt -get install build-essential zlib1g-dev libreadline-dev flex bison libssl-dev git-core postgresql-server-dev-9.1

I have cloned the pldebugger git repo to /usr/share/postgresql/9.1/extension/pldebugger.

There is no configure script.

I have added the ENV vars:

export USE_PGXS=1
export PATH=/usr/lib/postgresql/9.1/bin/:$PATH

From the /usr/share/postgresql/9.1/extension/pldebugger directory I have run make and got the output:

gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -DLINUX_OOM_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I/usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/../../src/pl/plpgsql/src -I. -I. -I/usr/include/postgresql/9.1/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.5 -c -o plpgsql_debugger.o plpgsql_debugger.c plpgsql_debugger.c:34:21: fatal error: plpgsql.h: No such file or directory compilation terminated. make: * [plpgsql_debugger.o] Error 1

I'm sure it's just a path issue but I'm not sure where to go from here.

share|improve this question
What you've done looks reasonable to me, and IIRC postgresql-server-dev-9.1 should contain plpgsql.h. Check with dpkg -L postgresql-server-dev-9.1 | grep plpgsql. I'm wondering if you're somehow seeing the wrong pg_config. What does which pg_config and pg_config --version --includedir-server output? –  Craig Ringer Jun 28 '13 at 0:09
dpkg -L postgresql-server-dev-9.1 | grep plpgsql doesn't produce any results #which pg_config /usr/lib/postgresql/9.1/bin/pg_config # pg_config --version --includedir-server PostgreSQL 9.1.9 –  Terry Jun 28 '13 at 1:13
Interesting; it looks like plpgsql.h isn't in postgresql-server-dev-9.1. Looks like a possible packaging issue; a search on packages.debian.org doesn't find it in the stable or testing packages, only in unstable. Maybe you'll need to use the PGDG PostgreSQL packages from apt.postgresql.org ? (You'll have to do a database dump and reload). –  Craig Ringer Jun 28 '13 at 3:58
Thanks for your help. We ended up building from source and grabbing out the .so and .sql files and adding them into the extensions directories. It all seems to be working fine now. Thanks again. –  Terry Jun 28 '13 at 4:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.