I am trying to install slony1-2.2.1 in ubuntu 12.04 + postgresql-9.3. The configuration is done but when i am firing "make all" command the following error is shown:
root@administrator:/home/priyatam/Desktop/icons/slony1-2.2.1# make all
make[1]: Entering directory /home/priyatam/Desktop/icons/slony1-2.2.1/src'
make[2]: Entering directory
/home/priyatam/Desktop/icons/slony1-2.2.1/src/parsestatements'
./test-scanner < /dev/null > emptytestresult.log
./test-scanner < ./test_sql.sql > test_sql.log`
./test-scanner < ./cstylecomments.sql > cstylecomments.log
make[2]: Leaving directory
/home/priyatam/Desktop/icons/slony1-2.2.1/src/parsestatements'
make[2]: Entering directory /home/priyatam/Desktop/icons/slony1-2.2.1/src/slon'
make[2]: Nothing to be done for
all'.
make[2]: Leaving directory /home/priyatam/Desktop/icons/slony1-2.2.1/src/slon'
make[2]: Entering directory
/home/priyatam/Desktop/icons/slony1-2.2.1/src/slonik'
make[2]: Nothing to be done for all'.
make[2]: Leaving directory
/home/priyatam/Desktop/icons/slony1-2.2.1/src/slonik'
make[2]: Entering directory /home/priyatam/Desktop/icons/slony1-2.2.1/src/backend'
gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../.. -fpic -I/usr/include/postgresql -c -o slony1_funcs.o slony1_funcs.c
slony1_funcs.c:23:23: fatal error: miscadmin.h: No such file or directory
compilation terminated.
make[2]: *** [slony1_funcs.o] Error 1
make[2]: Leaving directory
/home/priyatam/Desktop/icons/slony1-2.2.1/src/backend'
make[1]: * [all] Error 2
make[1]: Leaving directory `/home/priyatam/Desktop/icons/slony1-2.2.1/src'
make: * [all] Error 2
please help me out.
A couple of observations before the answer.
OK - the error is pretty clear. File "slony1_funcs.c" on line 23 tries to include "miscadmin.h" and fails. If you had googled "slony postgresql miscadmin.h no such file or directory" then you'd have seen several cases where people had the same problem (and solved it). Consider searching next time.
The problem is that it can't find the source headers for PostgreSQL. Since you're on ubuntu the package will be called something like 'postgresql-server-dev-9.3'.