2

-Hi I'm trying to install ns3.34 in ubuntu in VMware workstation pro and when I typed the command :

$ 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.
  • It got error like this :
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

  • Can someone help me fix this error? I'm sorry in advance if my grammar and question are wrong somewhere, it's my first time learning about ns3 and virtual machines.
waltinator
  • 36,399
  • 1
    Please provide OS/release details; one package you mention the error you mention is expected for specific release(s) thus it should be expected, or unexpected depending on details only you know. – guiverc Oct 30 '22 at 03:18
  • Does this answer your question? qt5-default not in Ubuntu 21.04 – guiverc Oct 30 '22 at 03:25
  • You could do apt-cache search python | grep dev and apt-cache search qt5 | less to find the correct package names. Also, remove python-dev and qt5-default from your command, to install the un-complained packages. Do python -v snd python3 -v to see which version you're running. Had you specified which Ubuntu release you are running, I could have been more helpful. Please read https://askubuntu.com/help/how-to-ask and https://askubuntu.com/help/formatting – waltinator Oct 30 '22 at 03:27
  • If your unstated release isn't from 2021 or later, then enabling universe is the obvious answer... but starting point is knowing your software stack (ie. what Ubuntu product & what release you're using) – guiverc Oct 30 '22 at 03:28
  • its the 22.04 version – Minh Duc Oct 31 '22 at 14:15

1 Answers1

1

You must be following some old tutorial, which is now out of date.

  1. Use python3-dev instead of python-dev.

  2. According to https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1926802, you don't anymore need qt5-default in recent versions of Ubuntu, as version 5 of Qt is the default version (Qt4 is now obsolete). You can simply remove it from the list of packages. If you need to install development packages for qt, run

sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212