My Asterisk ./configure is returning:

checking /root/pwlib/include/ptlib.h usability... no
checking /root/pwlib/include/ptlib.h presence... no
checking for /root/pwlib/include/ptlib.h... no
checking /usr/local/include/ptlib.h usability... no
checking /usr/local/include/ptlib.h presence... no
checking for /usr/local/include/ptlib.h... no
checking /usr/include/ptlib.h usability... yes
checking /usr/include/ptlib.h presence... yes
checking for /usr/include/ptlib.h... yes
checking for ptlib-config... no
./configure: line 27253: --ldflags: command not found
Cannot find ptlib-config - please install and try again

However I clearly have ptlib-dev installed:

# dpkg --list libpt*
ii  libpt-dbg                            2.10.4~dfsg-1
ii  libpt-dev                            2.10.4~dfsg-1
ii  libpt-doc                            2.10.4~dfsg-1
ii  libpt2.10.4                          2.10.4~dfsg-1
ii  libpth20                             2.0.7-16
ii  libpthread-stubs0:amd64              0.3-3
ii  libpthread-stubs0-dev:amd64          0.3-3
  • Why not use a binary package? If necessary, you could probably use a backport. Jan 8 '15 at 23:22
  • FWIW I get the same error on Ubuntu 12.04 (libpt-dev 2.10.2~dfsg-0ubuntu1); however replacing package libpt-dev by libpt-1.10.10-dev appears to allow it to configure successfully. I do not know enough about either libpt or asterisk to say whether this is a valid solution. Jan 9 '15 at 3:38
install libpt-dev

export PTLIB_CONFIG=/usr/share/ptlib/make/ptlib-config



You can use the apt-file tool to determine which packages contain a given filename:

$ sudo apt-get install apt-file
$ sudo apt-file update
$ apt-file search ptlib-config
libpt-dev: /usr/share/ptlib/make/ptlib-config

You should also be able to retrieve all of the build-time dependencies for a given package by running:

$ sudo apt-get build-dep $PACKAGE # where PACKAGE=asterisk in this case
  • I tried all that. Installed all the build-time dependencies and searched with apt-file. The thing IS installed just like in your example, but the problem persists. I don't know what is going on. Jan 9 '15 at 0:45

This worked for me, set this before you run ./configure:

export PTLIB_CONFIG=/usr/lib/pkgconfig

Anf then:

  • Thank you, on CentOS 6.8 helped export PTLIB_CONFIG=/usr/bin/pkg-config here.
    – brownian
    May 26 '16 at 9:29
install libpt-dev

export PTLIB_CONFIG=/usr/share/ptlib/make/ptlib-config

  • The install command you've given will fail because your syntax is invalid. (install: missing destination file operand after 'libpt-dev')
    – roaima
    Nov 15 '16 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.