slony1-2.2.1 installation error

397 views Asked by At

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 forall'. 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.

1

There are 1 answers

2
Richard Huxton On BEST ANSWER

A couple of observations before the answer.

  1. Why are you running "make all" as root? It might be required for "make install", but try to avoid running as root otherwise.
  2. Why are you building the source in "Desktop/icons/..."? Don't you think maybe in six months you might want to find it again? Consider putting your source in /usr/local/src or somewhere similar.

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'.