2013-08-22 48 views
0

我真的想知道这是否的libgdbm来自当缺乏的libgdbm,似乎它已经在安装Perl

/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

您使用的是哪种操作系统/分发? – friedo

+0

你没有使用包管理器的原因?他们为你提供所有的依赖。 –

+1

你在什么操作系统上?为什么在你刚刚学习的时候编译你自己的perl?大多数Unix和Linux发行版都已经发布了一些古老的'perl'。 ['perlbrew'工具](http://perlbrew.pl/)可以帮助编译最近的perl(只需添加'-Dusethreads'并完成它)。 – amon

回答

0

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