我真的想知道这个libgdbm来自哪里,它似乎已经在
中/usr/lib/libgdbm.so.2.0.0
/usr/local/lib/libgdbm.a
/usr/local/lib/libgdbm.la
/usr/local/lib/libgdbm.so
/usr/local/lib/libgdbm.so.3
/usr/local/lib/libgdbm.so.3.0.0
,但perl说
I used the command:
cc -o try -O2 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -fstack-protector -L/usr/local/lib try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
./try
and I got the following output:
./try: error while loading shared libraries: libgdbm.so.4: cannot open shared object file: No such file or directory
The program compiled OK, but exited with status 127.
(The supplied flags or libraries might be incorrect.)
You have a problem. Shall I abort Configure [y]
Ok. Stopping Configure.
这么多文件,我不知道为什么perl找不到任何文件。
答案 0 :(得分:0)
尝试将“-R / usr / local / lib”添加到LDFLAGS和/或CFLAGS环境变量中。 如果Linux可能会改变/etc/ld.so.conf中搜索目录的顺序