sudo apt-get install 得到未滿足的依賴關係結果

sudo apt-get install 得到未滿足的依賴關係結果

我有這個錯誤Linux ubuntu 4.4.0-198-generic #230-Ubuntu SMP Sat Nov 28 01:30:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ sudo apt-get -f install`
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 cpp-6 : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 g++-6 : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 g++-6-multilib : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 gcc-6 : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 gcc-6-multilib : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 lib32asan3 : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 lib32cilkrts5 : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 lib32gcc-6-dev : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 lib32stdc++-6-dev : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 lib32ubsan0 : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 libasan3 : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 libc6 : Breaks: libc6:i386 (!= 2.23-0ubuntu11.2) but 2.23-0ubuntu3 is installed
 libc6:i386 : Breaks: libc6 (!= 2.23-0ubuntu3) but 2.23-0ubuntu11.2 is installed
 libcilkrts5 : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
 libgcc-6-dev : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
            Depends: libgcc1 (>= 1:6.2.0-3ubuntu11~12.04) but 1:6.0.1-0ubuntu1 is installed
 libgcc1 : Breaks: libgcc1:i386 (!= 1:6.0.1-0ubuntu1) but 1:9.3.0-10ubuntu2~12.04 is installed
 libgcc1:i386 : Breaks: libgcc1 (!= 1:9.3.0-10ubuntu2~12.04) but 1:6.0.1-0ubuntu1 is installed
 libstdc++-6-dev : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
               Depends: libstdc++6 (>= 6.2.0-3ubuntu11~12.04) but 5.4.0-6ubuntu1~16.04.12 is installed
 libstdc++6 : Breaks: libstdc++6:i386 (!= 5.4.0-6ubuntu1~16.04.12) but 9.3.0-10ubuntu2~12.04 is installed
 libstdc++6:i386 : Breaks: libstdc++6 (!= 9.3.0-10ubuntu2~12.04) but 5.4.0-6ubuntu1~16.04.12 is installed
 libubsan0 : Depends: gcc-6-base (= 6.2.0-3ubuntu11~12.04) but 6.0.1-0ubuntu1 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

我嘗試更新:

$ sudo apt-get install updata
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package updata
$ sudo apt update
     Hit:1 http://tw.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://tw.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://tw.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:4 http://dl.ajaxplorer.info/repos/apt squeeze InRelease [7,126 B]
Err:4 http://dl.ajaxplorer.info/repos/apt squeeze InRelease
  The following signatures were invalid: KEYEXPIRED 1530185191
Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
Reading package lists... Done
W: Target Packages (main/binary-amd64/Packages) is configured multiple     times in /etc/apt/sources.list:47 and /etc/apt/sources.list:54
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:47 and /etc/apt/sources.list:54
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:47 and /etc/apt/sources.list:54
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:47 and /etc/apt/sources.list:54
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:47 and /etc/apt/sources.list:54
W: http://dl.ajaxplorer.info/repos/apt/dists/squeeze/InRelease: Signature by key E570B40867757573C52F115D062C7EBC11FFD694 uses weak digest algorithm (SHA1)
W: GPG error: http://dl.ajaxplorer.info/repos/apt squeeze InRelease: The following signatures were invalid: KEYEXPIRED 1530185191
E: The repository 'http://dl.ajaxplorer.info/repos/apt squeeze InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:47 and /etc/apt/sources.list:54
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:47 and /etc/apt/sources.list:54
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:47 and /etc/apt/sources.list:54
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:47 and /etc/apt/sources.list:54
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:47 and /etc/apt/sources.list:54
$ apt-key adv --keyserver pool.sks-keyservers.net --recv-keys E570B40867757573C52F115D062C7EBC11FFD694
Executing: /tmp/tmp.NXrgNdYHtv/gpg.1.sh --keyserver
pool.sks-keyservers.net
--recv-keys
E570B40867757573C52F115D062C7EBC11FFD694
gpg: requesting key 11FFD694 from hkp server pool.sks-keyservers.net
gpg: key 11FFD694: "Charles du Jeu (AjaXplorer Team) <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

我該如何解決這個問題?

答案1

有幾個問題在起作用:

1)

Err:4 http://dl.ajaxplorer.info/repos/apt squeeze InRelease
  The following signatures were invalid: KEYEXPIRED 1530185191

為此,請參見範例更新儲存庫時出現 GPG KEYEXPIRED 錯誤

如果您無法使用 取得此儲存庫的目前公鑰apt-key,則需要查看您的設定期望金鑰所在的位置。目前已逐步淘汰使用apt-key,有利於在檔案系統中儲存單一金鑰。

在 中的某處尋找deb與此儲存庫對應的條目/etc/apt。如果此條deb目中有類似內容[signed-by=/usr/share/keyrings/<myrepository>-archive-keyring.gpg],您需要使用目前金鑰刷新其中提到的文件。儲存庫的描述中可能有一條說明如何下載金鑰。

2)

它是update,不是updata;) 另外,沒有名為update(或updata) 的套件,因此您無法安裝它。這就是您的系統在 中告訴您的內容E: Unable to locate package updata。你可能想再研究一下系統學apt,這樣你就不會再去做基本上無意義(無意冒犯)的事情了sudo apt-get install updata

3)

您似乎已經配置了一些提供的儲存庫一些你需要但不是的包全部其中。例如,當您嘗試安裝時cpp-6,它還需要gcc-6-base.適合cpp-6你的版本有可用的,你會需要gcc-6-base 6.2.0-3ubuntu11~12.04,但你只有gcc-6-base 6.0.1-0ubuntu1

4)

正如 guiverc 在對你的問題的評論中已經提到的那樣,你似乎至少使用了一些相當老的軟體了。如您所見,gcc-6-base您想要安裝的軟體包(如果您有的話)適用於 Ubuntu 12.04,即從 2012 年開始。

總的來說,您可能需要對機器進行徹底的春季清潔。也許請某人親自查看會有所幫助,也許是您當地的 Linux 用戶群(如果有的話)。最終,備份您想要保留的所有資料並進行全新安裝可能會更容易。但這並不容易遠端做出決定。

相關內容