0

我真的很想知道这个 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找不到它们。

4

1 回答 1

0

尝试将“-R/usr/local/lib”添加到 LDFLAGS 和/或 CFLAGS 环境变量。如果 Linux 可能会更改 /etc/ld.so.conf 中搜索目录的顺序

于 2013-08-22T19:44:52.133 回答