root@de05610:/var/www# gem install pg
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/pg-0.12.2 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/pg-0.12.2/ext/gem_make.out
--------------------
find_header: checking for libpq/libpq-fs.h... -------------------- yes
"gcc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I/usr/include/postgresql -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <libpq/libpq-fs.h>
/* end */
--------------------
have_library: checking for PQconnectdb() in -lpq... -------------------- no
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I/usr/include/postgresql -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib -lruby1.8-static -lpq -lpthread -lrt -ldl -lcrypt -lm -lc"
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_global_listmech@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_set_mutex@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_encode@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_client_start@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_client_init@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_errdetail@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_errstring@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_dispose@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_setprop@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_getprop@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_decode@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_client_step@SASL2'
/usr/lib64/libldap_r-2.4.so.2: undefined reference to `sasl_client_new@SASL2'
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include <libpq-fe.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
/* end */
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I/usr/include/postgresql -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib -lruby1.8-static -lpq -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:5: error: too few arguments to function ‘PQconnectdb’
checked program was:
/* begin */
1: #include <libpq-fe.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { PQconnectdb(); return 0; }
/* end */
--------------------
have_library: checking for PQconnectdb() in -llibpq... -------------------- no
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I/usr/include/postgresql -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib -lruby1.8-static -llibpq -lpthread -lrt -ldl -lcrypt -lm -lc"
/usr/bin/ld: cannot find -llibpq
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include <libpq-fe.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
/* end */
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I/usr/include/postgresql -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib -lruby1.8-static -llibpq -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:5: error: too few arguments to function ‘PQconnectdb’
checked program was:
/* begin */
1: #include <libpq-fe.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { PQconnectdb(); return 0; }
/* end */
--------------------
have_library: checking for PQconnectdb() in -lms/libpq... -------------------- no
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I/usr/include/postgresql -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib -lruby1.8-static -lms/libpq -lpthread -lrt -ldl -lcrypt -lm -lc"
/usr/bin/ld: cannot find -lms/libpq
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include <libpq-fe.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
/* end */
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I/usr/include/postgresql -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib -lruby1.8-static -lms/libpq -lpthread -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:5: error: too few arguments to function ‘PQconnectdb’
checked program was:
/* begin */
1: #include <libpq-fe.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { PQconnectdb(); return 0; }
/* end */
Debian6.