Score:2

Package 'python-dev' and package 'qt5-default' has no installation candidate error in ubuntu terminal

th flag

-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.
guiverc avatar
cn flag
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 avatar
cn flag
Does this answer your question? [qt5-default not in Ubuntu 21.04](https://askubuntu.com/questions/1335184/qt5-default-not-in-ubuntu-21-04)
waltinator avatar
it flag
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
guiverc avatar
cn flag
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)
Minh Duc avatar
th flag
its the 22.04 version
Score:1
us flag

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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.