1

In Debian Jessie/8 there is GCC 4.9.2.
I need the latest version, GCC 6.x.

Is it possible to install it through Synaptic from the testing repository (i.e. the binary, not the source), in parallel with the old version?

Is there a risk of conflicts among libraries/headers/... Are they going to be stored in separate directories like gcc-4.9/ gcc-6.0/ ...?

So far, I have only been able to install a second compiler building it from source, in its own directory.

1 Answer 1

1

Yes sure.

If two packages conflict (e.g. because they contain the same file), then he package manager (apt, aptitude, synaptics, ...) will refuse to install both at the same time.

So you can install any packages in parallel, as long as the package manager allows you to. E.g. on my system, I have installed both gcc-5 and gcc-6.

Technically, the Conflict is expressed explicitely by the maintainer of a package. Obviously they cannot track all possible packages in the world, but instead really concentrate on the target release (e.g. packages from jessie properly conflict with other packages from jessie, but not necessarily with packages from woody (aka Debian GNU/Linux 3.0)). Since upgrading between consecutive releases (e.g. jessie -> stretch) is considered crucial, you can also rely on proper Conflicts when installing testing (aka next-to-be-stable) packages on stable systems.

OTOH, there might of course be bugs in the packaging, where the Conflicts are not properly expressed (if you find one, don't hesitate to report it). If this happens to happen, the installation will fail, and you can revert the change.

So it's pretty safe to try to install whatever packages are available in Debian.

(However, I wouldn't put that much trust into 3rd party repositories)

2
  • With a package manager, can I specify in which directory I want a package to be installed, so that it does not conflict with the default version?
    – Pietro
    Jan 10, 2017 at 10:19
  • no you cannot. the package manager guarantees that all components of the system work together. it cannot hold this guarantee if the user starts injecting random stuff. (and it doesn't conflict with the default version)
    – umläute
    Jan 10, 2017 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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