Linux Mint gcc++: 손상된 패키지로 인해 gcc++를 설치할 수 없습니다.

Linux Mint gcc++: 손상된 패키지로 인해 gcc++를 설치할 수 없습니다.

저는 컴퓨터 과학 학생이고 Linux Mint 18.2를 처음 사용합니다. Clion에서 간단한 프로젝트를 실행하려고 하는데 gcc++ 컴파일러에 문제가 있는 것 같습니다.

터미널에서 이 명령을 실행하려고 합니다.

sudo apt-get install gcc++

다음과 같은 결과를 얻었습니다.

    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+'

긴 댓글 목록에서...를 선택하고 마지막으로 다음을 수행합니다.

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.

이 문제를 어떻게 해결할 수 있나요?

답변1

이 패키지를 설치해야 합니다 g++:

sudo apt install g++

(설치하려고 하면 패키지 이름이 일치하지 않아 gcc++이상한 결과가 나오므로 정규식으로 해석하여 일치하는 패키지를 모두 설치하려고 시도하지만 서로 충돌하여 설치할 수 없습니다.)gcc++apt-get

관련 정보