2

I have a Debian 8 installed with its GCC4.8, and need to install GCC6, too.

Using Synaptic, if I select GCC6 from the list of installable packages, I get a message of this kind:

Mark additional required changes?
To be removed:
clang
g++
g++4.9
gnome
part of kde
libreoffice
...

Of course there must be something wrong in what I did. How can I simply install a new compiler without all these side effects?

  • 1
    In order to have both versions installed you should install GCC6 manually by compiling it and not through Synaptic. – Zumo de Vidrio Jan 9 '17 at 14:46
  • 1
    What did you do to make GCC 6 available in Synaptic? (What repositories did you add?) – Stephen Kitt Jan 9 '17 at 14:46
  • @StephenKitt: I added this line to /etc/apt/sources.list: deb http://ftp.uk.debian.org/debian testing main contrib – Pietro Jan 9 '17 at 14:50
  • @ZumodeVidrio: I suppose the same applies to Ubuntu, right? – Pietro Jan 9 '17 at 14:51
  • 1
    Yes that will check the source out of gnu's subversion repository. Then read the readme, it will tell you to do, if I remember correct: ./configure; make; sudo make install I would recommend, using options to configure (that I can never remember), to set the install root to /usr/local instead of /usr. Only apt should put stuff in /usr/, /bin, etc. /usr/local has directories for lib, bin, var, etc etc (always put staff that you (as opposed to apt) install in /usr/local or /opt) – ctrl-alt-delor Jan 9 '17 at 21:26
0

At the end, I built it from source.

AFAIK, installers can only deal with standard, predefined, locations for the executables, and if you need multiple versions of the same tools, you had better build then in /usr/local/.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.