在 Ubuntu 16.10 上构建 ns-3 时出错
Errors while building ns-3 on Ubuntu 16.10
我正在尝试在 ubuntu 16.10 上安装 ns-3 但是当我尝试使用以下命令构建时
python bake.py build
我有 3 个错误:
Building nsc-0.5.3 - Problem
Problem: Optional dependency, module "nsc-0.5.3" failed
This may reduce the functionality of the final build.
However, bake will continue since "nsc-0.5.3" is not an essential dependency.
For more information call bake with -v or -vvv, for full verbose mode.
Building pybindgen-0.16.0.825 - Problem
Unavailable building tool for module pybindgen-0.16.0.825, install waf
Problem: Optional dependency, module "pybindgen-0.16.0.825" failed
This may reduce the functionality of the final build.
However, bake will continue since "pybindgen-0.16.0.825" is not an essential dependency.
For more information call bake with -v or -vvv, for full verbose mode.
Building ns-3.17 - Problem
Error: Critical dependency, module "ns-3.17" failed
For more information call Bake with --debug and/or -v, -vvv, for full verbose mode (bake --help)
我应该怎么解决它们?
我遇到了类似的问题,我发现 NSC 不能与 gcc/g++-6 一起正常工作。所以我不得不更改 gcc 和 g++ 的默认版本(例如从 6.3.0 到 5.4.1)
1) 查找已安装的编译器:
dpkg --list | grep compiler
2) 更改默认 gcc、g++、cc 和 c++(通过 https://askubuntu.com/questions/26498/choose-gcc-and-g-version):
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++
此外,检查更改是否已保存:
gcc -v
最后应该说:"gcc version 5.4.1"(或上面说明中安装和使用的低于 6 的任何内容)。
之后,我成功安装了 NSC(这是我的主要问题)。
希望对您有所帮助!
我正在尝试在 ubuntu 16.10 上安装 ns-3 但是当我尝试使用以下命令构建时
python bake.py build
我有 3 个错误:
Building nsc-0.5.3 - Problem Problem: Optional dependency, module "nsc-0.5.3" failed This may reduce the functionality of the final build. However, bake will continue since "nsc-0.5.3" is not an essential dependency. For more information call bake with -v or -vvv, for full verbose mode.
Building pybindgen-0.16.0.825 - Problem Unavailable building tool for module pybindgen-0.16.0.825, install waf Problem: Optional dependency, module "pybindgen-0.16.0.825" failed This may reduce the functionality of the final build. However, bake will continue since "pybindgen-0.16.0.825" is not an essential dependency. For more information call bake with -v or -vvv, for full verbose mode.
Building ns-3.17 - Problem Error: Critical dependency, module "ns-3.17" failed For more information call Bake with --debug and/or -v, -vvv, for full verbose mode (bake --help)
我应该怎么解决它们?
我遇到了类似的问题,我发现 NSC 不能与 gcc/g++-6 一起正常工作。所以我不得不更改 gcc 和 g++ 的默认版本(例如从 6.3.0 到 5.4.1)
1) 查找已安装的编译器:
dpkg --list | grep compiler
2) 更改默认 gcc、g++、cc 和 c++(通过 https://askubuntu.com/questions/26498/choose-gcc-and-g-version):
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++
此外,检查更改是否已保存:
gcc -v
最后应该说:"gcc version 5.4.1"(或上面说明中安装和使用的低于 6 的任何内容)。
之后,我成功安装了 NSC(这是我的主要问题)。
希望对您有所帮助!