Qt 4.x installation on Ubuntu 18.04
-
@Just_Liberty said in Qt 4.x installation on Ubuntu 18.04:
Well that was easy! So, is that -default a Qtism, an Ubuntu-ism, a package-ism, or a Linux-ism? How would I find that out if I (you!) didn't know it? Thanks very much.
Each Linux distribution has a package mechanism or rather each major distribution has. For example all Debian derivates like Ubuntu uses Debian's package manager. That's one of the first thing you should look for when installing one or the other flavours of Linux. Also note that most of them also have one or more GUI available so you don't necessarily have to go through the command line.
-
@Just_Liberty To add to @SGaist : on Debian derivatives like Ubuntu you can install Synaptic - it is a graphical user interface for the packet manager.
-
As a matter of principle, I wouldn't use a GUI to help install under Linux, that's too helpful ;-)
In addition to to @aha_1980's
apt-cache search qt4
suggestion, be aware that the shell (bash
) will (getapt
to) suggest completions for installation packages just via the tab key on the command line. It's not an "in-string" search likeapt-cache search
, but it's a convenient starting point. So if you are interested in packages which might start withqt4
, just type inapt-get install qt4
and press the Tab key. That will expand to
qt4-
in this case, as that's the only completion here. Pressing Tab now a second time will list all the packages starting withqt4-
(12 in my case). That's what I do when I know the prefix of the package but not what's available. -
@Just_Liberty
Heads-up, just to be clear about the "3 vs 2 times". (I see I mis-explained this above.) It depends when you started pressing Tab, and shell filename completion works the same:-
If you start from
apt-get install qt4
, the only possible completions at that point all start withqt4-
(note the hyphen). Pressing Tab once will append the hyphen and that's it at that point. -
You now have
apt-get install qt4-
. At this point there are multiple possible completions all fromqt4-
. When you press Tab once nothings (seems to) happen (in fact, I think the terminal "bell" rings to tell you this), because the shell does not know what you want next. If you then press Tab a second time at this point it will list all the possible completions, so that you know what you might want to type next.
Above is all default
bash
behaviour (can be modified). So if you start fromapt-get install qt4
you will end up pressing Tab 3 times, if you start fromapt-get install qt4-
it will only be 2 Tabs. See?This is all worth knowing if you like
bash
filename completion. That has worked for years & years, back to UNIX days. What's new (to me, somewhere along the line) is that it used to be only filename completion.bash
now seems to be "clever" and look at what you have to the left on the command-line and adjust what it does to the "context" of the command you're intending, e.g.gunzip <filename><TAB>
only offers files ending in.gz
,tar xf archive.tar <file-to-extract><TAB>
looks inside the archive for filenames to offer, etc.! Often helpful, sometimes annoying! :) -
-
@JonB The logic behind this bash feature is called bash-completion and is of course adjustable ;)
-
@aha_1980
Aha! [So to speak.] What do I say to my Linux admin expert friend who says/claims it does not work in his Ubuntu 16.04 when it's working for me in 18.04, I know it always used to work in 17.04, and I would have thought when I started it 16.04 it did? How long do you think that "customizable" bash completion has been available & implemented, is it really new? -