包 mc 不可用,但被另一個包 (i386) 引用

包 mc 不可用,但被另一個包 (i386) 引用

Ubuntu 18.04升級到20.04後無法安裝Midnight Commander。

Linux版本

$ sudo lsb_release -a No LSB modules are available. Distributor
ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04
Codename:   focal

來源列表

deb ----://mirror.yandex.ru/ubuntu/ focal main 
deb ----://archive.ubuntu.com/ubuntu focal main 
deb ----://mirror.yandex.ru/ubuntu/ focal-updates main 
deb ----://mirror.yandex.ru/ubuntu/ focal universe

我嘗試其他來源,但沒有幫助

deb mirror://mirrors.ubuntu.com/mirrors.txt focal main restricted universe multiverse
deb-src mirror://mirrors.ubuntu.com/mirrors.txt focal main restricted universe multiverse

deb mirror://mirrors.ubuntu.com/mirrors.txt focal-updates main restricted universe multiverse
deb-src mirror://mirrors.ubuntu.com/mirrors.txt focal-updates main restricted universe multiverse

deb mirror://mirrors.ubuntu.com/mirrors.txt focal-security main restricted universe multiverse
deb-src mirror://mirrors.ubuntu.com/mirrors.txt focal-security main restricted universe multiverse

deb mirror://mirrors.ubuntu.com/mirrors.txt focal-backports main restricted universe multiverse
deb-src mirror://mirrors.ubuntu.com/mirrors.txt focal-backports main restricted universe multiverse

deb ----://archive.canonical.com/ubuntu focal partner
deb-src ----://archive.canonical.com/ubuntu focal partner

更新包列表

$ sudo apt update 
Hit:1 ----://mirror.yandex.ru/ubuntu focal InRelease
Hit:2 ----://mirror.yandex.ru/ubuntu focal-updates InRelease          
Hit:3 ----://archive.ubuntu.com/ubuntu focal InRelease                
Hit:4 ----://archive.canonical.com/ubuntu focal InRelease             
Reading package lists... 
Done Building dependency tree        
Reading state information... Done 
4 packages can be upgraded. 
Run 'apt list --upgradable' to see them.

嘗試安裝MC

$ sudo apt install mc 
Reading package lists... Done 
Building dependency tree      
Reading state information... Done 
Package mc is not available, but is referred to by another package. This may mean
that the package is missing, has been obsoleted, or is only available
from another source However the following packages replace it:  
  mc-data
E: Package 'mc' has no installation candidate

結果指令 dkpg

$ dpkg -l mc*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version           Architecture Description
+++-=======================-=================-============-==========================================================
rc  mc                      3:4.8.19-1        i386         Midnight Commander - a powerful file manager
ii  mc-data                 3:4.8.24-2ubuntu1 all          Midnight Commander - a powerful file manager -- data files
un  mcedit                  <none>            <none>       (no description available)
rc  mcp-account-manager-uoa 3.8.6-0ubuntu9.2  i386         GNOME multi-protocol chat and call client (UOA plugin)

我不知道,如何修復它。也許你有想法?

答案1

我檢查來源https://mirror.yandex.ru/ubuntu/dists/focal/universe/ 並且在中找不到包 mc

https://mirror.yandex.ru/ubuntu/dists/focal/universe/binary-i386/Packages.gz

但發現在

https://mirror.yandex.ru/ubuntu/dists/focal/universe/binary-amd64/Packages.gz

這意味著該軟體包不適用於 x86 架構,但適用於 x64。

如果需要安裝“mc”,則需要從https://launchpad.net

cd /tmp/
sudo apt remove mc-data
wget http://launchpadlibrarian.net/448485168/mc-data_4.8.23-1_all.deb
wget http://launchpadlibrarian.net/448485186/mc_4.8.23-1_i386.deb
sudo dpkg -i mc-data_4.8.23-1_all.deb
sudo dpkg -i mc_4.8.23-1_i386.deb

我們現在可以運行 ''mc'',但我們不能運行 ''apt full-upgrade'' ,因為這個命令安裝更新的 ''mc-data'' 並刪除了與他不相容的 ''mc''。

相關內容