Linux Mint gcc ++: não é possível instalar o gcc ++ devido a pacotes quebrados

0

Sou estudante do CS e novo no Linux Mint 18.2. Eu estou tentando executar um projeto simples no Clion, mas aparentemente eu tenho um problema com o meu compilador gcc ++.

Eu tento executar este comando no terminal:

sudo apt-get install gcc++

e obtém o seguinte:

    Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'gcc-4.9-hppa-linux-gnu' for regex 'gcc+'
Note, selecting 'libsfgcc1-dbg-armhf-cross' for regex 'gcc+'

Lista longa de notas, selecionando ...... e o final disso é:

The following packages have unmet dependencies:
 gcc-4.7-plugin-dev : Depends: libgmpv4-dev (>= 2:5.0.1~) but it is not going to be installed
 gcc-4.8-aarch64-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-4.8-arm-linux-gnueabihf : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-4.8-multilib : Depends: libc6-dev-x32 (>= 2.11) but it is not going to be installed
 gcc-4.8-powerpc-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-4.8-powerpc64le-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-4.9-aarch64-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-4.9-arm-linux-gnueabi : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-4.9-arm-linux-gnueabihf : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-4.9-multilib : Depends: libc6-dev-x32 (>= 2.11) but it is not going to be installed
 gcc-4.9-powerpc-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-4.9-powerpc64le-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-4.9-s390x-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-aarch64-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-alpha-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-arm-linux-gnueabi : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-arm-linux-gnueabihf : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-hppa-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-m68k-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-mips-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-mips64-linux-gnuabi64 : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-mips64el-linux-gnuabi64 : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-mipsel-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-multilib : Depends: libc6-dev-x32 (>= 2.11) but it is not going to be installed
 gcc-5-powerpc-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-powerpc-linux-gnuspe : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-powerpc64-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-powerpc64le-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-s390x-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-sh4-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-5-sparc64-linux-gnu : Conflicts: gcc-multilib but 4:5.3.1-1ubuntu1 is to be installed
 gcc-multilib : Conflicts: gcc-4.9-aarch64-linux-gnu but 4.9.3-13ubuntu2cross1 is to be installed
                Conflicts: gcc-4.9-arm-linux-gnueabi but 4.9.3-13ubuntu2cross1 is to be installed
                Conflicts: gcc-4.9-arm-linux-gnueabihf but 4.9.3-13ubuntu2cross1 is to be installed
                Conflicts: gcc-4.9-powerpc-linux-gnu but 4.9.3-13ubuntu2cross1 is to be installed
                Conflicts: gcc-4.9-powerpc64le-linux-gnu but 4.9.3-13ubuntu2cross1 is to be installed
                Conflicts: gcc-4.9-s390x-linux-gnu but 4.9.3-13ubuntu2cross1 is to be installed
                Conflicts: gcc-5-aarch64-linux-gnu
                Conflicts: gcc-5-alpha-linux-gnu
                Conflicts: gcc-5-arm-linux-gnueabi
                Conflicts: gcc-5-arm-linux-gnueabihf
                Conflicts: gcc-5-hppa-linux-gnu
                Conflicts: gcc-5-m68k-linux-gnu
                Conflicts: gcc-5-mips-linux-gnu
                Conflicts: gcc-5-mips64-linux-gnuabi64
                Conflicts: gcc-5-mips64el-linux-gnuabi64
                Conflicts: gcc-5-mipsel-linux-gnu
                Conflicts: gcc-5-powerpc-linux-gnu
                Conflicts: gcc-5-powerpc-linux-gnuspe
                Conflicts: gcc-5-powerpc64-linux-gnu
                Conflicts: gcc-5-powerpc64le-linux-gnu
                Conflicts: gcc-5-s390x-linux-gnu
                Conflicts: gcc-5-sh4-linux-gnu
                Conflicts: gcc-5-sparc64-linux-gnu
                Conflicts: gcc-5-aarch64-linux-gnu:i386
                Conflicts: gcc-5-arm-linux-gnueabihf:i386
                Conflicts: gcc-5-powerpc-linux-gnu:i386
                Conflicts: gcc-5-powerpc64le-linux-gnu:i386
                Conflicts: gcc-5-alpha-linux-gnu:i386
                Conflicts: gcc-5-arm-linux-gnueabi:i386
                Conflicts: gcc-5-hppa-linux-gnu:i386
                Conflicts: gcc-5-m68k-linux-gnu:i386
                Conflicts: gcc-5-mips-linux-gnu:i386
                Conflicts: gcc-5-mips64-linux-gnuabi64:i386
                Conflicts: gcc-5-mips64el-linux-gnuabi64:i386
                Conflicts: gcc-5-mipsel-linux-gnu:i386
                Conflicts: gcc-5-powerpc-linux-gnuspe:i386
                Conflicts: gcc-5-powerpc64-linux-gnu:i386
                Conflicts: gcc-5-s390x-linux-gnu:i386
                Conflicts: gcc-5-sh4-linux-gnu:i386
                Conflicts: gcc-5-sparc64-linux-gnu:i386
 gcc-snapshot : Depends: libc6-dev-x32 (>= 2.11) but it is not going to be installed
                Depends: libc6-x32 (>= 2.23) but it is not going to be installed
 gccgo-4.7-multilib : Depends: libx32go0 (>= 4.7.4-3ubuntu12) but it is not going to be installed
 gccgo-4.8-multilib : Depends: libx32go4 (>= 4.8.5-4ubuntu2) but it is not going to be installed
 gccgo-4.9-multilib : Depends: libx32go5 (>= 4.9.3-13ubuntu2) but it is not going to be installed
 gccgo-5-multilib : Depends: libx32go7 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
 gccgo-6-multilib : Depends: libx32go9 (>= 6.0.1-0ubuntu1) but it is not going to be installed
 lib32gcc-4.7-dev : Depends: libx32gomp1 (>= 4.7.4-3ubuntu12) but it is not going to be installed
                    Depends: libx32itm1 (>= 4.7.4-3ubuntu12) but it is not going to be installed
                    Depends: libx32quadmath0 (>= 4.7.4-3ubuntu12) but it is not going to be installed
 lib32gcc-4.8-dev : Depends: libx32gomp1 (>= 4.8.5-4ubuntu2) but it is not going to be installed
                    Depends: libx32itm1 (>= 4.8.5-4ubuntu2) but it is not going to be installed
                    Depends: libx32atomic1 (>= 4.8.5-4ubuntu2) but it is not going to be installed
                    Depends: libx32asan0 (>= 4.8.5-4ubuntu2) but it is not going to be installed
                    Depends: libx32quadmath0 (>= 4.8.5-4ubuntu2) but it is not going to be installed
 lib32gcc-4.9-dev : Depends: libx32gomp1 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                    Depends: libx32itm1 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                    Depends: libx32atomic1 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                    Depends: libx32asan1 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                    Depends: libx32ubsan0 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                    Depends: libx32cilkrts5 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                    Depends: libx32quadmath0 (>= 4.9.3-13ubuntu2) but it is not going to be installed
 lib32gcc-5-dev : Depends: libx32gomp1 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                  Depends: libx32itm1 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                  Depends: libx32atomic1 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                  Depends: libx32asan2 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                  Depends: libx32ubsan0 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                  Depends: libx32cilkrts5 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                  Depends: libx32quadmath0 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
 lib64gcc-4.7-dev:i386 : Depends: libx32gcc1:i386 (>= 1:4.7.4-3ubuntu12) but it is not going to be installed
 lib64gcc-4.8-dev:i386 : Depends: libx32gcc1:i386 (>= 1:4.8.5-4ubuntu2) but it is not going to be installed
                         Depends: libx32asan0:i386 (>= 4.8.5-4ubuntu2) but it is not going to be installed
 lib64gcc-4.9-dev:i386 : Depends: libx32gcc1:i386 (>= 1:4.9.3-13ubuntu2) but it is not going to be installed
                         Depends: libx32asan1:i386 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                         Depends: libx32ubsan0:i386 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                         Depends: libx32cilkrts5:i386 (>= 4.9.3-13ubuntu2) but it is not going to be installed
 lib64gcc-5-dev:i386 : Depends: libx32gcc1:i386 (>= 1:5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                       Depends: libx32asan2:i386 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                       Depends: libx32ubsan0:i386 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                       Depends: libx32cilkrts5:i386 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
 libx32gcc-4.7-dev : Depends: libx32gomp1 (>= 4.7.4-3ubuntu12) but it is not going to be installed
                     Depends: libx32itm1 (>= 4.7.4-3ubuntu12) but it is not going to be installed
                     Depends: libx32quadmath0 (>= 4.7.4-3ubuntu12) but it is not going to be installed
 libx32gcc-4.8-dev : Depends: libx32gomp1 (>= 4.8.5-4ubuntu2) but it is not going to be installed
                     Depends: libx32itm1 (>= 4.8.5-4ubuntu2) but it is not going to be installed
                     Depends: libx32atomic1 (>= 4.8.5-4ubuntu2) but it is not going to be installed
                     Depends: libx32asan0 (>= 4.8.5-4ubuntu2) but it is not going to be installed
                     Depends: libx32quadmath0 (>= 4.8.5-4ubuntu2) but it is not going to be installed
 libx32gcc-4.9-dev : Depends: libx32gomp1 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                     Depends: libx32itm1 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                     Depends: libx32atomic1 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                     Depends: libx32asan1 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                     Depends: libx32ubsan0 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                     Depends: libx32cilkrts5 (>= 4.9.3-13ubuntu2) but it is not going to be installed
                     Depends: libx32quadmath0 (>= 4.9.3-13ubuntu2) but it is not going to be installed
 libx32gcc-5-dev : Depends: libx32gomp1 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                   Depends: libx32itm1 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                   Depends: libx32atomic1 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                   Depends: libx32asan2 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                   Depends: libx32ubsan0 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                   Depends: libx32cilkrts5 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
                   Depends: libx32quadmath0 (>= 5.4.0-6ubuntu1~16.04.5) but it is not going to be installed
 libx32gcc1 : Depends: libc6-x32 (>= 2.16) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Como posso corrigir isso?

    
por Ori Ben Zaken 03.11.2017 / 11:24

1 resposta

3

Você precisa instalar o pacote g++ :

sudo apt install g++

(A tentativa de instalar gcc++ produz os resultados estranhos que você está obtendo porque gcc++ não corresponde a um nome de pacote, então apt-get interpreta como regex e tenta instalar todos os pacotes correspondentes, o que não podem porque eles entram em conflito.)

    
por 03.11.2017 / 11:25