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
asked Nov 16, 2013 at 17:39
shiroe
6172 gold badges12 silver badges29 bronze badges
1 Answer 1
It looks like you are missing development libraries even for glibc. Just install devel packages for glibc and postgresql and try again.
answered Nov 16, 2013 at 17:55
David Unric
7,7691 gold badge41 silver badges67 bronze badges
Sign up to request clarification or add additional context in comments.
2 Comments
David Unric
@Trenza It looks like base header files are not found in standard directories. Does exist
/usr/include/sys/cdefs.h ? glibc devel package should place it there.shiroe
No! sys dir doesn't exist. I've found it in /usr/include/i386-linux-gnu/sys/cdefs.h
lang-rb