本文介绍了为什么在DynaLoader中安装DBD :: Pg失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Error:  Can't load '/home/oracle/.cpan/build/DBD-Pg-2.16.1/blib/arch/auto/DBD/Pg/Pg.so' for module DBD::Pg: libpq.so.5: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230.

在安装DBD :: Pg perl模块时是否有人有类似的错误?我该怎么做才能解决它?

Did anyone have similar error while instaling DBD::Pg perl module ? what can I do to fix it ?

推荐答案

您应该使用perl来解决这些动态链接问题。使用 strace程序&>退出,然后对 libpq.so.5 使用grep。我的猜测是您的 libpq.so.5 放在错误的位置,或者您的配置错误。阅读 @dl_library_path 上的文档。

You should go under perl to solve these dynamic linking problems. Use strace program &> out, and then grep for libpq.so.5. My guess is your libpq.so.5 is in the wrong location, or your DynaLoader is misconfigured. Read the docs on @dl_library_path.

您可以看到您的搜索路径是什么(strace还会通过检查每个目录来显示它试图查找.so的路径):

You can see what your search path is with this (the strace will also show it trying to find the .so by checking each directory):

perl -MDynaLoader -le'print for @DynaLoader::dl_library_path;'

确保您的 libpq.5.so 属于其中之一。 strace 还将显示内核是否正在向DynaLoader返回错误,表明该错误是伪装的。此外,它肯定会告诉您DynaLoader所知道的一切。

Make sure your libpq.5.so falls in one of those. The strace will also show if the kernel is returning an error to DynaLoader that it is cloaking; moreover, it will certainly tell you everything DynaLoader knows.

这篇关于为什么在DynaLoader中安装DBD :: Pg失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 20:47