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依賴庫的解決辦法

  • linux終耑下借助awk命令查詢篩出網站access.log日志裡的統計信息

我要說說
網上賓友點評