简体   繁体   English

安装Perl时缺少libgdbm

[英]Lacking libgdbm when installing perl

I really want to know where does this libgdbm comes from and it seems it has been in 我真的很想知道这个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

, but perl says ,但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.

so many files, I don't know why perl can't find any of them. 如此多的文件,我不知道为什么perl找不到它们。

Try adding "-R/usr/local/lib" to LDFLAGS and/or CFLAGS environment variables. 尝试在LDFLAGS和/或CFLAGS环境变量中添加“ -R / usr / local / lib”。 If Linux perhaps change the order of searched directories in /etc/ld.so.conf 如果Linux可能会更改/etc/ld.so.conf中搜索目录的顺序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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