ns2在ubuntu 13.10中的allinone安装错误

 独坤2602884605 发布于 2023-02-06 15:48

我正在尝试使用ns-allinone-2.35.tar.gz软件包在我的ubuntu 13.10中安装ns2.

起初我得到x11/*目录未找到错误.在完成一些教程并安装以下工具后,帮助我克服了这些问题.

sudo apt-fast install tcl8.5-dev tk8.5-dev
sudo apt-fast install build-essential autoconf automake
sudo apt-fast install perl xgraph libxt-dev libx11-dev libxmu-dev
sudo apt-fast install xorg-dev g++ xgraph

但是,现在我收到以下错误:

linkstate/ls.h:137:58: error: ‘erase’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
  void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
                                                          ^
linkstate/ls.h:137:58: note: declarations in dependent base ‘std::map, std::allocator > >’ are not found by unqualified lookup
linkstate/ls.h:137:58: note: use ‘this->erase’ instead
make: *** [linkstate/ls.o] Error 1
Ns make failed!

这是我试图安装和失败的第5天.因为依赖于如此多的依赖,在使用Cygwin在Windows 7中安装时感到烦躁,现在我正在尝试使用ubuntu但是遇到了这样的错误.

怎么解决这个?

1 个回答
  • 我编辑的行数的137 ns-2.35/linkstate/ls.h

    void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
    

    void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
    

    我的ns2安装成功.但是在kali-linux中.在ubuntu中,虽然我正确地设置了路径并且它显示了nam安装成功的消息,但是nam不工作并且显示错误,它没有安装.

    如果你想验证,它会显示一些失败.您可以通过安装libperl4-corelibs-perl使用来纠正它们

    sudo apt-get install libperl4-corelibs-perl
    

    或者如果你安装了apt-fast那么

    sudo apt-fast install libperl4-corelibs-perl
    

    如果有人可以帮助我解决ubuntu中的nam安装问题.它会很有用.

    2023-02-06 15:50 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有