debian系統報libncurses6 : Depends: libtinfo6 (= 6.2+20201114-2+deb11u1) but 6.4-4 is to be installed

字號+ 編輯: 国内TP粉 修訂: 种花家 來源: 2023-09-11 我要說兩句(0)

如果忘記了之前是怎麽配置鏡像源的話, 稍微不小心就掉到這個坑裡。

今天小編在制作鏡像時發現竟然安裝不了基本的linux命令,例如ps等,報類似以下的錯誤

libncurses6 : Depends: libtinfo6 (= 6.2+20201114-2+deb11u1) but 6.4-4 is to be installed

重新安裝libtinfo6的指令也沒用

apt-get --reinstall install libtinfo6
Reinstallation of libtinfo6 is not possible, it cannot be downloaded.

或者提示各種依賴錯誤

Reading package lists... Done
Building dependency tree... Done
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:
 bash : PreDepends: libtinfo6 (>= 6) but it is not going to be installed
 ncurses-bin : PreDepends: libtinfo6 (>= 6.3) but it is not going to be installed
 util-linux : PreDepends: libtinfo6 (>= 6) but it is not going to be installed
              Recommends: sensible-utils but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

網上有說換回官方的源就ok了,這確實是一個萬能方法,可是網路實在太差呀。安裝一個包要等半天。最後一查,原來是鏡像源沒有對應正確的系統版本,版本搞錯了。

比如你用的是debian11,卻用的debian10的鏡像源,就會報這個錯誤。

修改鏡像源的方法, 編輯一下sources.list文档:

vi /etc/apt/sources.list
deb https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware

之後更新一下文档列表就可以了

apt-get update

安裝你想安裝的文档吧。

閲完此文,您的感想如何?
  • 有用

    0

  • 沒用

    0

  • 開心

    0

  • 憤怒

    0

  • 可憐

    0

1.如文章侵犯了您的版權,請發郵件通知本站,該文章將在24小時内刪除;
2.本站標注原創的文章,轉發時煩請注明來源;
3.交流群: 2702237 13835667

相關課文
  • 防止退出linux終耑退出之後導致的nohup進程強制退出

  • Linux系統下word文档轉成pdf的辦法

  • ubuntu和debian安裝nginx或者tengine報錯, 找不到pcre依賴庫的解決辦法

  • 常見的web中間件請求返回狀態碼

我要說說
網上賓友點評