5

I run Trusty Desktop on a 64 bit machine, so if I query installed packages, e.g.:

$ dpkg-query -l gcc* | grep 'ii '
ii  gcc                      4:4.8.2-1ubuntu6        amd64        GNU C compiler
ii  gcc-4.8                  4.8.4-2ubuntu1~14.04    amd64        GNU C compiler
ii  gcc-4.8-base:amd64       4.8.4-2ubuntu1~14.04    amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-4.8-base:i386        4.8.4-2ubuntu1~14.04    i386         GCC, the GNU Compiler Collection (base package)
ii  gcc-4.8-doc              4.8.4-2ubuntu1~14.04    all          Documentation for the GNU compilers (gcc, gobjc, g++)
ii  gcc-4.8-multilib         4.8.4-2ubuntu1~14.04    amd64        GNU C compiler (multilib files)
ii  gcc-4.9-base:amd64       4.9.1-0ubuntu1          amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-4.9-base:i386        4.9.1-0ubuntu1          i386         GCC, the GNU Compiler Collection (base package)

why do I see those i386 installed packages ? I have 118 of them on that particular install... Is it that some dependencies for amd64 packages are satisfied by some i386 packages ? Is it something else ? Does the OS need them ?

Note: I am really asking "why are they here?" not "how do I get rid of them?". The latter question is well covered.

Cbhihe
  • 2,761
  • 3
  • 24
  • 47
  • 2
    sudo apt-get install aptitude; aptitude why gcc-4.8-base:i386 – A.B. Dec 21 '15 at 17:00
  • 2
    IIRC the particular ones mentioned are needed for gcc to build i386 binaries on x86_64 i.e. to support the -m32 compiler flag. As such, they are probably there because gcc-multilib is installed: however, I don't recally gcc-multilib being installed automatically (it is only a suggested package for gcc) - I can't answer that part. – steeldriver Dec 21 '15 at 17:51
  • @steeldriver: +1. Yes, I did install gcc-multilib as an option (suggested package). Really interesting but this was just a handy example. Are you saying that the presence of other such packages correspond to the same logic? Namely that i386 installed packages derive from optional or suggested packages installs ? Not from the main base x86_64 packages ? – Cbhihe Dec 21 '15 at 20:58
  • @A.B.: installing aptitude now. Finally. Will report. – Cbhihe Dec 21 '15 at 21:01
  • @A.B.: This is IT ! Please, can you formulate a short answer so I can mark it as accepted ? aptitude is oddly great. Had heard about it quite a bit but for me synaptic from the gui was good enough. I don't think I will look back. cli rules. – Cbhihe Dec 21 '15 at 21:18
  • @Cbhihe I wouldn't feel comfortable generalizing about that: I'm only (vaguely) familiar with gcc-multilib and friends (g++-multilib, gfortran-multilib) – steeldriver Dec 22 '15 at 00:39

1 Answers1

4

A simple command gives you the necessary information. But first you have to install a nifty tool:

sudo apt-get install aptitude

Now check with e.g.:

aptitude why gcc-4.8-base:i386
A.B.
  • 90,397
  • As it turns out, executing aptitude why gcc-4.8-base:i386 in terminal throws i skype (amd64) and i A skype-bin:i386 back. But then checking reverse dependencies for installed packages with sudo apt-cache rdepends --installed gcc-4.8-base:i386 in terminal yields nothing related to skype.... 0_o ? How should I interpret the result of aptitude why gcc-4.8-base:i386 ? – Cbhihe Dec 22 '15 at 08:20
  • 1
    You have to follow up the dependency tree. – A.B. Dec 23 '15 at 21:34