-嗨,我正在尝试在 VMware Workstation Pro 中的 ubuntu 中安装 ns3.34,当我输入以下命令时:
$ sudo apt install g++ python3 python3-dev \
python-dev pkg-config sqlite3 python3-setuptools git qt5-default \
gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz \
gir1.2-gtk-3.0 ipython3 openmpi-bin \
openmpi-common openmpi-doc libopenmpi-dev autoconf cvs bzr \
unrar openmpi-bin openmpi-common openmpi-doc \
libopenmpi-dev tcpdump wireshark libxml2 libxml2-dev.
- 出现如下错误:
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:i386 python2:i386 python2-dev python2 python-dev-is-python3
Package qt5-default 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
E: Package 'python-dev' has no installation candidate
E: Package 'qt5-default' has no installation candidate
- 有人能帮我修复这个错误吗?如果我的语法和问题有误,我提前道歉,这是我第一次学习 ns3 和虚拟机。
答案1
您一定是在遵循一些旧的教程,这些教程现在已经过时了。
使用
python3-dev
而不是python-dev
。根据https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1926802,在最近的 Ubuntu 版本中你不再需要
qt5-default
,因为 Qt 版本 5 是默认版本(Qt4 现已过时)。你可以简单地将其从包列表中删除。如果你需要安装 qt 的开发包,请运行
sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools