构建ns-3时出错

时间:2015-04-14 08:32:14

标签: python python-2.7 build ns-3

我正在尝试通过tarball安装ns-3,但是当我尝试使用以下命令构建

  

./ build.py --enable-examples --enable-tests

如手册中给出的我得到以下错误:

Traceback (most recent call last):
  File "./build.py", line 170, in <module>
    sys.exit(main(sys.argv))
  File "./build.py", line 111, in main
    config = dom.parse(dot_config)
  File "/usr/local/lib/python2.7/xml/dom/minidom.py", line 1917, in parse
    from xml.dom import expatbuilder
  File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 32, in <module>
    from xml.parsers import expat
  File "/usr/local/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: /usr/local/lib/python2.7/lib-dynload/pyexpat.so: undefined symbol: PyUnicodeUCS2_DecodeUTF

我知道这个错误与python有关但在进行了大量的Google搜索后无法解决。有人可以帮我进一步操作吗?

1 个答案:

答案 0 :(得分:0)

解决:

经过深思熟虑的研究后,我发现Python for Linux默认设置为UCS2。 我使用

从源代码重建了Python
 ./configure --enable-unicode=ucs4 

使用UCS4强制编译。 这是link