gpt4 book ai didi

ubuntu - 我无法运行 apt-get 命令。 apt --fix-broken install 不起作用。以下软件包具有未满足的依赖关系 libc6-dbg 和 libc6-dev

转载 作者:行者123 更新时间:2023-12-04 12:07:31 25 4
gpt4 key购买 nike

我是新来的
我有 Ubuntu 18.04 LTS
当我运行 sudo 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:
libc6-dbg : Depends: libc6 (= 2.27-3ubuntu1.2) but 2.27-3ubuntu1 is installed
libc6-dev : Depends: libc6 (= 2.27-3ubuntu1.2) but 2.27-3ubuntu1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
然后我运行 sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
libsss-nss-idmap0
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libc6
Suggested packages:
glibc-doc
The following packages will be upgraded:
libc6
1 upgraded, 0 newly installed, 0 to remove and 72 not upgraded.
2 not fully installed or removed.
Need to get 0 B/2,827 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: warning: files list file for package 'linux-image-5.3.0-53-generic' missing; assuming package has no files currently installed
(Reading database ... 214594 files and directories currently installed.)
Preparing to unpack .../libc6_2.27-3ubuntu1.2_amd64.deb ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3ubuntu1.2_amd64.deb (--unpack):
new libc6:amd64 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.27-3ubuntu1.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我尝试使用 sudo apt-get install -f ,但仍然得到同样的错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
libsss-nss-idmap0
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libc6
Suggested packages:
glibc-doc
The following packages will be upgraded:
libc6
1 upgraded, 0 newly installed, 0 to remove and 72 not upgraded.
2 not fully installed or removed.
Need to get 0 B/2,827 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: warning: files list file for package 'linux-image-5.3.0-53-generic' missing; assuming package has no files currently installed
(Reading database ... 214594 files and directories currently installed.)
Preparing to unpack .../libc6_2.27-3ubuntu1.2_amd64.deb ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3ubuntu1.2_amd64.deb (--unpack):
new libc6:amd64 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.27-3ubuntu1.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
此外,在屏幕的右上角,会出现一条通知,上面写着:
发生错误,请从右键菜单或终端中的 apt-get 运行包管理器以查看问题所在。错误消息是:“错误:BrokenCount>0”。这通常意味着您安装的软件包具有未满足的依赖关系
我尝试安装新更新,但软件更新程序显示此消息:
可用磁盘空间不足
升级需要磁盘“/boot”上总共 107 M 的可用空间。请在“/boot”上至少释放额外的 49.6 M 磁盘空间。您可以使用 'sudo apt autoremove' 删除旧内核,还可以在/etc/initramfs-tools/initramfs.conf 中设置 COMPRESS=xz 以减小 initramfs 的大小。
我试试 sudo apt autoremove
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:
libc6-dbg : Depends: libc6 (= 2.27-3ubuntu1.2) but 2.27-3ubuntu1 is installed
libc6-dev : Depends: libc6 (= 2.27-3ubuntu1.2) but 2.27-3ubuntu1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
这些都是我安装的内核
$ sudo dpkg --list | egrep -i --color 'linux-image|linux-headers'
ii linux-headers-5.3.0-51 5.3.0-51.44~18.04.2 all Header files related to Linux kernel version 5.3.0
ii linux-headers-5.3.0-51-generic 5.3.0-51.44~18.04.2 amd64 Linux kernel headers for version 5.3.0 on 64 bit x86 SMP
ii linux-headers-5.3.0-53 5.3.0-53.47~18.04.1 all Header files related to Linux kernel version 5.3.0
ii linux-headers-5.3.0-53-generic 5.3.0-53.47~18.04.1 amd64 Linux kernel headers for version 5.3.0 on 64 bit x86 SMP
ii linux-headers-5.3.0-59 5.3.0-59.53~18.04.1 all Header files related to Linux kernel version 5.3.0
ii linux-headers-5.3.0-59-generic 5.3.0-59.53~18.04.1 amd64 Linux kernel headers for version 5.3.0 on 64 bit x86 SMP
ii linux-headers-generic-hwe-18.04 5.3.0.59.113 amd64 Generic Linux kernel headers
ri linux-image-5.3.0-53-generic 5.3.0-53.47~18.04.1 amd64 Signed kernel image generic
ii linux-image-5.3.0-59-generic 5.3.0-59.53~18.04.1 amd64 Signed kernel image generic
ii linux-image-generic-hwe-18.04 5.3.0.59.113 amd64 Generic Linux kernel image

最佳答案

对于这个不好的问题,我很抱歉,但我找到了解决方案
当我执行 sudo apt --fix-broken install ,我没有看到这一行:

debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
我们必须运行这个: sudo fuser -v /var/cache/debconf/config.dat你会看到这样的东西:
                     USER        PID ACCESS COMMAND
/var/cache/debconf/config.dat:
root 5346 F.... frontend
你必须运行 sudo kill <PID> ,其中 PID 是上面的数字,在本例中为 sudo kill 5346最后,运行 sudo apt-get install -f然后你就可以运行 sudo apt-get update

关于ubuntu - 我无法运行 apt-get 命令。 apt --fix-broken install 不起作用。以下软件包具有未满足的依赖关系 libc6-dbg 和 libc6-dev,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62843154/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com