简体   繁体   中英

Problems while installing pg gem

I need to install pg gem, but the installation failed. I've tried all the solution propesed in other questions but no luck.

Here is my output, and here is my "mkmf.log" file

Any idea?

[UPDATE]

I've solved the first problem by putting libs in the correct directory. But now I've another problem:

find_executable: checking for pg_config... -------------------- yes

--------------------

"gcc -o conftest -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -I/usr/include/postgresql  -D_FILE_OFFSET_BITS=64  -fno-strict-aliasing -g -g -O2 -fPIC conftest.c  -L. -L/usr/lib -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic     -lruby-1.9.1-static  -lpthread -lrt -ldl -lcrypt -lm   -lc"
/usr/bin/ld: cannot find crtbegin.o: No such file or directory
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main() {return 0;}
/* end */

[UPDATE2]

Solved it by putting links to "libgcc", "libgcc_s", "crtend.o", "crtendS.o", "crtbeginS.o" and "crtbegin.o" into /usr/lib

It looks like you are missing development libraries even for glibc. Just install devel packages for glibc and postgresql and try again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM