首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在进行apt-get升级或安装apt-get时出错

在进行apt-get升级或安装apt-get时出错
EN

Unix & Linux用户
提问于 2019-06-14 13:12:26
回答 1查看 697关注 0票数 0

当我试图在Debian9.0服务器上安装或升级任何东西时,我遇到了一个错误。

这就是终点站给我的。

代码语言:javascript
复制
root@engelmar:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cdebconf : Depends: libdebian-installer4 (>= 0.110) but it is not installed
            Depends: libtextwrap1 but it is not installed
 libc-bin : Depends: libc6 (< 2.25) but 2.28-10 is installed
 libc-dev-bin : Depends: libc6 (< 2.25) but 2.28-10 is installed
 libc6-dev : Depends: libc6 (= 2.24-11+deb9u4) but 2.28-10 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@engelmar:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-libc-dev python-all sysstat
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libdebian-installer4 libtextwrap1
The following packages will be REMOVED:
  build-essential g++ g++-6 libc-bin libc-dev-bin libc6-dev libexpat1-dev libpython-all-dev libpython-dev libpython2.7-dev libstdc++-6-dev python-all-dev python-dev
  python2.7-dev
The following NEW packages will be installed:
  libdebian-installer4 libtextwrap1
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  libc-bin
0 upgraded, 2 newly installed, 14 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 0 B/201 kB of archives.
After this operation, 102 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?] Yes, do as I say!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "pt_BR:pt:en",
        LC_ALL = (unset),
        LANG = "pt_BR.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: Arquivo ou diretório não encontrado
debconf: delaying package configuration, since apt-utils is not installed
dpkg: error processing package debconf (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 debconf
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@engelmar:~#

有人知道怎么修吗?

EN

回答 1

Unix & Linux用户

发布于 2019-06-14 14:32:31

我很抱歉地告诉你,你的系统可能坏到了无法合理修理的地步。为了追溯工作以确定发生了什么,您说您正在运行Debian 9系统,但是您的libc6包是从Debian 10 (2.28)安装的--这通常是由于试图混合来自多个版本的Debian或Debian衍生工具(如Ubuntu )的use而引起的。Debian的wiki在这个主题上有一些话要说:

不要使FrankenDebian Debian稳定,不应该与其他版本相结合。如果您正在尝试安装当前Debian稳定版本中不可用的软件,那么为其他Debian版本添加存储库并不是一个好主意。问题可能不会马上发生,但下次安装更新时。之所以会出现故障,是因为为一个Debian版本打包的软件是为兼容该版本的其他软件而构建的。例如,在拉伸系统上安装buster软件包也可以安装较新版本的核心库,包括libc6。这导致一个系统不是测试或稳定的,而是两者的组合破裂。

在这个阶段,您最好的选择可能是备份数据并重新安装操作系统,这一次要确保没有任何存储库试图从不适合Debian 9的存储库中提取。

票数 3
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/524890

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档