![ns3 请问我有一个关于 ns3 安装的问题,我遇到了这个错误,我不知道该怎么做](https://linux22.com/image/1193819/ns3%20%E8%AF%B7%E9%97%AE%E6%88%91%E6%9C%89%E4%B8%80%E4%B8%AA%E5%85%B3%E4%BA%8E%20ns3%20%E5%AE%89%E8%A3%85%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%8C%E6%88%91%E9%81%87%E5%88%B0%E4%BA%86%E8%BF%99%E4%B8%AA%E9%94%99%E8%AF%AF%EF%BC%8C%E6%88%91%E4%B8%8D%E7%9F%A5%E9%81%93%E8%AF%A5%E6%80%8E%E4%B9%88%E5%81%9A.png)
youx@youx:~$ sudo apt install build-essential autoconf automake libxmu-dev python-pygraphviz cvs mercurial bzr git cmake p7zip-full python-matplotlib python-tk python-dev python-kiwi python-gnome2 python-gnome2-desktop qt4-dev-tools qt4-qmake qt4-qmake qt4-default gnuplot-x11 wireshark
[sudo] password for youx:
Sorry, try again.
[sudo] password for youx:
Sorry, try again.
[sudo] password for youx:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python2-dev python2 python-dev-is-python3
E: Unable to locate package python-pygraphviz
E: Unable to locate package python-matplotlib
E: Package 'python-dev' has no installation candidate
E: Unable to locate package python-kiwi
E: Unable to locate package python-gnome2
E: Unable to locate package python-gnome2-desktop
E: Unable to locate package qt4-dev-tools
E: Unable to locate package qt4-qmake
E: Unable to locate package qt4-qmake
E: Unable to locate package qt4-default
答案1
ns-3 是一个用于互联网系统的离散事件网络模拟器,主要用于研究和教育用途。
要在所有当前支持的 Ubuntu 版本中安装 ns3,请打开终端并输入:
sudo apt install ns3
要在 Ubuntu 20.04 和 Ubuntu 22.04 中安装 ns3 的 Python 绑定,请打开终端并输入:
sudo apt install python3-ns3