Ubuntu

在 mint 20.2 上使用 libc6 解決損壞的未滿足依賴關係

  • April 26, 2022

我在一所大學工作,在那裡我被迫進入 Microsoft 生態系統。啊。鑑於這一現實,我想安裝 linux OneDrive 客戶端。

https://github.com/abraunegg/onedrive

我收到以下錯誤,我無法解決。

$ sudo apt install onedrive
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
onedrive : Depends: libc6 (>= 2.33) but 2.31-0ubuntu9.2 is to be installed
           Depends: libphobos2-ldc-shared94 (>= 1:1.24.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

系統以及我是如何來到這裡的

我正在使用核心 5.11 執行 Linux Mint 20.2:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description:    Linux Mint 20.2
Release:    20.2
Codename:   uma

$ uname -r
5.11.0-46-generic

我在這裡按照 OneDrive 客戶端的安裝說明進行操作:

https://github.com/abraunegg/onedrive/blob/master/docs/ubuntu-package-install.md

注意第 3 步說要遵循 Ubuntu 20.04 安裝。當我這樣做時,我會在這篇文章的頂部看到錯誤列表。

典型的apt命令顯示我是最新的:

$ sudo apt-get update         
Ign:1 http://packages.linuxmint.com uma InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                
Hit:3 http://packages.linuxmint.com uma Release                                                                                                             
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]                                                                                   
Hit:5 http://download.virtualbox.org/virtualbox/debian focal InRelease                                                                                      
Hit:6 http://archive.canonical.com/ubuntu focal InRelease                                                                                                   
Hit:7 http://archive.ubuntu.com/ubuntu focal InRelease                                                                                                      
Hit:8 http://dell.archive.canonical.com focal InRelease                                                                                                     
Get:9 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ InRelease [3,622 B]                                                                        
Get:11 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                                                                                    
Hit:12 https://repo.protonvpn.com/debian stable InRelease                                                                                        
Hit:13 https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_21.04 ./ InRelease
Get:14 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Fetched 340 kB in 2s (168 kB/s)     
Reading package lists... Done

$ sudo apt-get upgrade -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

$ sudo apt-get autoremove -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

$ sudo apt-get autoclean -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done

如果您想知道一個未升級的軟體包,它的 snapd:

$ sudo apt-cache policy | tail
<omitted stuff>
Pinned packages:
    snapd -> 2.51.1+20.04ubuntu2 with priority -10
    snapd -> 2.49.2+20.04 with priority -10
    snapd -> 2.48.3+20.04 with priority -10
    snapd -> 2.44.3+20.04 with priority -10

我知道我安裝了 2.31-0ubuntu9.2。

$ sudo apt-cache policy libc6
libc6:
 Installed: 2.31-0ubuntu9.2
 Candidate: 2.31-0ubuntu9.2
 Version table:
*** 2.31-0ubuntu9.2 500
       500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
       100 /var/lib/dpkg/status
    2.31-0ubuntu9 500
       500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

而且我需要更新版本的libc6. 我假設我目前版本的 libc6 包含在2.31-0ubuntu9.2

兩個問題:

  • 為什麼apt報告`2.31-0ubuntu9.2 is to be installed." 在我看來它已經安裝了。
  • 我該如何解決這個問題?(或者我只是生活在通過瀏覽器或執行虛擬 Windoze 機器訪問 OneDrive 的效率低下)

我確信我可以四處探勘並找到一種方法來升級libc6,但我想知道這是否明智,因為它是一個非常基礎的庫。

感謝您提供的任何資訊。我特別感謝對建議解決方案的解釋,這樣我就可以繼續學習有效地管理我的電腦。

您可以通過以下方式onedrive在 linux mint 上安裝:

啟用 Universe 儲存庫:

Onedrive 打包在universe儲存庫下。您可以通過以下方式安裝它:

sudo add-apt-repository universe
sudo apt update
sudo apt install onedrive
從 OpenSuSE 建構服務儲存庫:

你不需要升級libc6。您需要使用Ubuntu 20.04而不是 21.04 的說明:

echo 'deb https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_20.04/ ./' | sudo tee /etc/apt/sources.list.d/onedrive.list
wget -qO - https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_20.04/Release.key | sudo apt-key add -
sudo apt update
sudo apt install onedrive

引用自:https://unix.stackexchange.com/questions/686512