linux - 安装perl时缺少libgdbm

标签 linux perl installation

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

最佳答案

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

关于linux - 安装perl时缺少libgdbm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18389440/

相关文章:

java - "java.lang.OutOfMemoryError: Java heap space"到底是什么?我该如何增加 Java 的内存?

linux - 一条命令删除目录及其子目录

c - 动态库动态附加

php - Perl/MySQL 'Host is not allowed' 和 ' failed: Client does not support authentication protocol requested by server' 错误?

javascript - 如何从同一数组中搜索以其他词开头和结尾的词?

linux - 如何在 Mac OS X 上安装 Mono Winforms Designer?

java - 如何安装Java EE?

c - 为什么 printf 显示 unsigned int 的负值?

linux - 获取符号链接(symbolic link)完整路径

linux - 在 Suse Enterprise 10.0 上安装 MonoDevelop