apt-get에 문제가 있습니다(Linux Mint 17).

apt-get에 문제가 있습니다(Linux Mint 17).

sudo apt-get dist-upgrade를 실행하는 데 문제가 있습니다.

나는 다음과 같은 결과를 얻습니다.

    $ sudo apt-get dist-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.4) but 5.4.1-2ubuntu1~14.04 is installed
              Breaks: libreoffice-core (<= 1:4.4.4~rc3-0ubuntu1) but 1:4.2.8-0ubuntu5.1 is installed
              Breaks: libstdc++6:i386 (!= 5.4.0-6ubuntu1~16.04.4) but 7.2.0-1ubuntu1~14.04 is installed
 libstdc++6:i386 : Breaks: libstdc++6 (!= 7.2.0-1ubuntu1~14.04) but 5.4.0-6ubuntu1~16.04.4 is installed
E: Unmet dependencies. Try using -f.

sudo apt-get -f install을 실행해 보았고 다음과 같은 결과를 얻었습니다.

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libstdc++6
The following packages will be upgraded:
  libstdc++6
1 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
3 not fully installed or removed.
Need to get 0 B/305 kB of archives.
After this operation, 501 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 370318 files and directories currently installed.)
Preparing to unpack .../libstdc++6_7.2.0-1ubuntu1~14.04_amd64.deb ...
Unpacking libstdc++6:amd64 (7.2.0-1ubuntu1~14.04) over (5.4.0-6ubuntu1~16.04.4) ...
dpkg: error processing archive /var/cache/apt/archives/libstdc++6_7.2.0-1ubuntu1~14.04_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libstdc++6', which is different from other instances of package libstdc++6:amd64
Processing triggers for libc-bin (2.19-0ubuntu6.13) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libstdc++6_7.2.0-1ubuntu1~14.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Linux Mint에 Ubuntu 항목을 가리키는 잘못된 ppa를 추가한 것 같습니다. 또한 x64 아키텍처 대신 i386용 lib6stdc++를 설치했을 수도 있습니다.

짧은 이야기: 나는 이것에 대해 완전히 길을 잃었습니다. 이 문제를 해결하는 데 도움을 주실 수 있나요?

도움을 주셔서 미리 감사드립니다 :)

답변1

Ubuntu Xenial/Mint 18의 올바른 libstdc++6 버전은 5.4.0입니다. 버전 7.2가 설치되고 있으며 컴퓨터에 이미 설치된 버전과 충돌합니다. 이는 libstdc++6이 비공식 Mint/Ubuntu 저장소에서 얻어졌다는 것을 의미합니다.

먼저 그것이 어디서 왔는지 결정하십시오:

$ apt-cache policy libstdc++6
libstdc++6:
  Installed: 5.4.0-6ubuntu1~16.04.4
  Candidate: 5.4.0-6ubuntu1~16.04.4
  Version table:
 *** 5.4.0-6ubuntu1~16.04.4 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     5.3.1-14ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

apt-cache policy의 출력이 간략하게 설명됩니다.이 질문에는. 다양한 후보 버전, 설치된 버전, 설치될 버전(가장 높은 우선순위)을 제공합니다.

이 출력에서 ​​7.2 버전의 소스를 찾고 해당 저장소를 주석 처리합니다. 저장소를 삭제할 수 있는 옵션이 없으면 우선 순위를 낮출 수도 있습니다 -- man apt_preferences.

관련 정보