ns3中的Python编码在ubuntu12.04中失败

2024-04-24 14:32:07 发布

您现在位置:Python中文网/ 问答频道 /正文

我的机器上有Ubuntu 12.04。我按照nsnam中的说明在我的计算机上安装了ns3。我在这之前没有任何错误。我正在尝试使用python来运行我的代码。我安装了Python2.7.3和./waf--pyrun示例/第一.py不会跑。我在谷歌上搜索了很多东西,都找不到它为什么失败的答案。这是配置日志对于我的错误:

from /home/shaul/tarballs/ns3/ns-3.13/bindings/python: Test does not build: Traceback (most recent call last):
  File "/home/shaul/tarballs/ns3/ns-3.13/.waf-1.6.7-0a94702c61504c487a251b8d0a04ca9a/waflib/Tools/c_config.py", line 435, in run_c_code
    bld.compile()
  File "/home/shaul/tarballs/ns3/ns-3.13/.waf-1.6.7-0a94702c61504c487a251b8d0a04ca9a/waflib/Build.py", line 193, in compile
    raise Errors.BuildError(self.producer.error)
BuildError: Build failed
 -> task failed (exit status 1): 
    {task 169552396: cxxprogram test.cpp.1.o -> testprog}
['/usr/bin/g++', 'test.cpp.1.o', '-o', '/home/shaul/tarballs/ns3/ns-3.13/build/.conf_check_9a1d0551212c9d703363e62dfbc51c79/testbuild/testprog', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L/usr/lib', '-lpython2.7', '-Wl,-Bsymbolic-functions', '-Wl,-z,relro']

not found
from /home/shaul/tarballs/ns3/ns-3.13/bindings/python: The configuration failed


# try again with -L$python_LIBPL (some systems don't install the python library in $prefix/lib)

Tags: infrompybuildhome错误notbindings
1条回答
网友
1楼 · 发布于 2024-04-24 14:32:07

nsnam的指令告诉你下载源代码并构建它:在ubuntu12.04上这不是最好的方法。Ubuntu12.04有一个专门为您构建的软件包:

sudo apt-get install ns3

应该会成功的。别大惊小怪。在

相关问题 更多 >