Astertest: problem /usr/bin/ld: cannot find -lpq


#1

Hi try to configure astertest following step by step the instructions in asteriskguru.com/tutorials/astertest.html

When i am at the 5 steps Recompiling Asterisk, after Make i have this problem:

asterpbx2:/usr/src/asterisk/asterisk-1.2.7# make
build_tools/make_version_h > include/asterisk/version.h.tmp
if cmp -s include/asterisk/version.h.tmp include/asterisk/version.h ; then echo; else
mv include/asterisk/version.h.tmp include/asterisk/version.h ;
fi

rm -f include/asterisk/version.h.tmp
if cmp -s .cleancount .lastclean ; then echo ; else
make clean; cp -f .cleancount .lastclean;
fi

build_tools/make_defaults_h > defaults.h.tmp
if cmp -s defaults.h.tmp defaults.h ; then echo ; else
mv defaults.h.tmp defaults.h ;
fi

rm -f defaults.h.tmp
for x in res channels pbx apps codecs formats agi cdr funcs utils stdtime; do make -C $x depend || exit 1 ; done
make[1]: Entering directory /usr/src/asterisk/asterisk-1.2.7/res' make[1]: Nothing to be done fordepend’.
make[1]: Leaving directory /usr/src/asterisk/asterisk-1.2.7/res' make[1]: Entering directory/usr/src/asterisk/asterisk-1.2.7/channels’
make[1]: Nothing to be done for depend'. make[1]: Leaving directory/usr/src/asterisk/asterisk-1.2.7/channels’
make[1]: Entering directory /usr/src/asterisk/asterisk-1.2.7/pbx' make[1]: Nothing to be done fordepend’.
make[1]: Leaving directory /usr/src/asterisk/asterisk-1.2.7/pbx' /bin/sh: line 1: curl-config: command not found make[1]: Entering directory/usr/src/asterisk/asterisk-1.2.7/apps’
make[1]: Nothing to be done for depend'. make[1]: Leaving directory/usr/src/asterisk/asterisk-1.2.7/apps’
make[1]: Entering directory /usr/src/asterisk/asterisk-1.2.7/codecs' make[1]: Nothing to be done fordepend’.
make[1]: Leaving directory /usr/src/asterisk/asterisk-1.2.7/codecs' make[1]: Entering directory/usr/src/asterisk/asterisk-1.2.7/formats’
make[1]: Nothing to be done for depend'. make[1]: Leaving directory/usr/src/asterisk/asterisk-1.2.7/formats’
make[1]: Entering directory /usr/src/asterisk/asterisk-1.2.7/agi' make[1]: Nothing to be done fordepend’.
make[1]: Leaving directory /usr/src/asterisk/asterisk-1.2.7/agi' make[1]: Entering directory/usr/src/asterisk/asterisk-1.2.7/cdr’
make[1]: Nothing to be done for depend'. make[1]: Leaving directory/usr/src/asterisk/asterisk-1.2.7/cdr’
make[1]: Entering directory /usr/src/asterisk/asterisk-1.2.7/funcs' make[1]: Nothing to be done fordepend’.
make[1]: Leaving directory /usr/src/asterisk/asterisk-1.2.7/funcs' make[1]: Entering directory/usr/src/asterisk/asterisk-1.2.7/utils’
make[1]: Nothing to be done for depend'. make[1]: Leaving directory/usr/src/asterisk/asterisk-1.2.7/utils’
make[1]: Entering directory /usr/src/asterisk/asterisk-1.2.7/stdtime' make[1]: Nothing to be done fordepend’.
make[1]: Leaving directory /usr/src/asterisk/asterisk-1.2.7/stdtime' cd editline && unset CFLAGS LIBS && test -f config.h || ./configure make -C editline libedit.a make[1]: Entering directory/usr/src/asterisk/asterisk-1.2.7/editline’
make[1]: libedit.a' is up to date. make[1]: Leaving directory/usr/src/asterisk/asterisk-1.2.7/editline’
make[1]: Entering directory /usr/src/asterisk/asterisk-1.2.7/db1-ast' make[1]:libdb1.a’ is up to date.
make[1]: Leaving directory /usr/src/asterisk/asterisk-1.2.7/db1-ast' make[1]: Entering directory/usr/src/asterisk/asterisk-1.2.7/stdtime’
make[1]: libtime.a' is up to date. make[1]: Leaving directory/usr/src/asterisk/asterisk-1.2.7/stdtime’
for x in res channels pbx apps codecs formats agi cdr funcs utils stdtime; do make -C $x || exit 1 ; done
make[1]: Entering directory /usr/src/asterisk/asterisk-1.2.7/res' make[1]: Nothing to be done forall’.
make[1]: Leaving directory /usr/src/asterisk/asterisk-1.2.7/res' make[1]: Entering directory/usr/src/asterisk/asterisk-1.2.7/channels’
make[1]: Nothing to be done for all'. make[1]: Leaving directory/usr/src/asterisk/asterisk-1.2.7/channels’
make[1]: Entering directory /usr/src/asterisk/asterisk-1.2.7/pbx' make[1]: Nothing to be done forall’.
make[1]: Leaving directory /usr/src/asterisk/asterisk-1.2.7/pbx' /bin/sh: line 1: curl-config: command not found make[1]: Entering directory/usr/src/asterisk/asterisk-1.2.7/apps’
gcc -pipe -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -Iinclude -I…/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i686 -DZAPTEL_OPTIMIZATIONS -fomit-frame-pointer -fPIC -c -o securax_utils.o securax_utils.c
gcc -shared -Xlinker -x -o app_securax_serverload.so app_securax_serverload.o securax_utils.o -L/usr/local/pgsql/lib -lpq
/usr/bin/ld: cannot find -lpq
collect2: ld returned 1 exit status
make[1]: *** [app_securax_serverload.so] Error 1
make[1]: Leaving directory `/usr/src/asterisk/asterisk-1.2.7/apps’
make: *** [subdirs] Error 1

asterpbx2:/usr/src/asterisk/asterisk-1.2.7#

Any idea?


#2

Installier mal das Postgres developement Paket.
Libpq ist die PostgreSQL Client Library.

Edit:
LMAO…forgot i am in an english forum :stuck_out_tongue:

Ok, please install the postgre developer package.
Libpq is the PostgreSQL client library.