您的位置:首页 > 其它

NS3学习第一阶段---运行NS3实例

2013-03-28 13:00 183 查看
运行NS3实例时出现以下问题:

error while loading shared libraries: libns3.so: cannot open shared object file: No such file or directory

原因分析:系统无法找到动态运行库libns3.so

解决方法:

在命令台中输入locate libsn3.so(其功能是找到libns3.so这个文件的目录并列出)。找到该文件目录之后,将目录加到/etc/ld.so.conf文件里面。

使用echo "/usr/local/lib" >> /etc/ld.so.conf(/usr/local/lib应替换问文件的目录)

然后再直接执行: ldconfig

若以上命令出现bash: /etc/ld.so.conf: Permission denied错误,则换用以下命令:$ sudo bash -c 'echo /usr/local/lib >> /etc/ld.so.conf'

然后在ldconfig。

在执行ldconfig时又出现问题了:/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied

其实ldconfig命令需要root权限,只要改成sudo ldconfig就OK了,问题解决!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: