gpt4 book ai didi

ubuntu - 配置 dpkg 失败并出现错误 "Package dpkg is not configured yet."

转载 作者:行者123 更新时间:2023-12-04 18:42:24 27 4
gpt4 key购买 nike

有些东西肯定是困惑的,它与 dpkg 有关。不知道是什么原因造成的。以下是症状:
命令 sudo apt upgrade , sudo apt install <any package> , sudo apt remove <any package>sudo apt install -f全部失败并出现以下错误:

Setting up dpkg (1.21.1ubuntu2.1) ...
head: error reading 'info.bak': Is a directory
dpkg: error processing package dpkg (--configure):
installed dpkg package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
dpkg
sudo apt update运行没有问题。
这是 sudo dpkg --configure -a 的输出,虽然我没有技术知识如何做出正面或反面的含义:
Setting up dpkg (1.21.1ubuntu2.1) ...
head: error reading 'info.bak': Is a directory
dpkg: error processing package dpkg (--configure):
installed dpkg package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of libdpkg-perl:
libdpkg-perl depends on dpkg (>= 1.18.11); however:
Package dpkg is not configured yet.

dpkg: error processing package libdpkg-perl (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dpkg-dev:
dpkg-dev depends on libdpkg-perl (= 1.21.1ubuntu2); however:
Package libdpkg-perl is not configured yet.

dpkg: error processing package dpkg-dev (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of pkg-config:
pkg-config depends on libdpkg-perl; however:
Package libdpkg-perl is not configured yet.

dpkg: error processing package pkg-config (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libglib2.0-dev:amd64:
libglib2.0-dev:amd64 depends on pkg-config; however:
Package pkg-config is not configured yet.

dpkg: error processing package libglib2.0-dev:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libdbus-1-dev:amd64:
libdbus-1-dev:amd64 depends on pkg-config; however:
Package pkg-config is not configured yet.

dpkg: error processing package libdbus-1-dev:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent processing triggers for install-info:
install-info depends on dpkg (>= 1.16.1); however:
Package dpkg is not configured yet.

dpkg: error processing package install-info (--configure):
dependency problems - leaving triggers unprocessed
dpkg: dependency problems prevent processing triggers for sgml-base:
sgml-base depends on dpkg (>= 1.16.4); however:
Package dpkg is not configured yet.

dpkg: error processing package sgml-base (--configure):
dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
dpkg
libdpkg-perl
dpkg-dev
pkg-config
libglib2.0-dev:amd64
libdbus-1-dev:amd64
install-info
sgml-base
我看到另一个关于类似主题的线程建议输出 stat / /dev /var可能有用(虽然我不确定是什么)。无论如何,这里是:
  File: /
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 2 Links: 20
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2022-06-11 12:23:55.966935477 +1000
Modify: 2022-03-28 17:02:40.336120240 +1100
Change: 2022-06-11 12:15:41.459498623 +1000
Birth: 2020-12-31 15:04:54.000000000 +1100
File: /dev
Size: 4720 Blocks: 0 IO Block: 4096 directory
Device: 5h/5d Inode: 1 Links: 21
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2022-06-11 11:59:38.006513248 +1000
Modify: 2022-06-11 11:59:17.901323228 +1000
Change: 2022-06-11 11:59:17.901323228 +1000
Birth: -
File: /var
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 5767169 Links: 15
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2022-04-28 09:42:56.569785898 +1000
Modify: 2021-08-18 10:28:44.011762167 +1000
Change: 2021-08-18 10:28:44.011762167 +1000
Birth: 2020-12-31 15:04:58.512613837 +1100
运行 sudo chown root /没有任何区别。
我的系统:
                          ./+o+-       mblizzard@HP248G1
yyyyy- -yyyyyy+ OS: Ubuntu 22.04 jammy
://+//////-yyyyyyo Kernel: x86_64 Linux 5.15.0-23-generic
.++ .:/++++++/-.+sss/` Uptime: 1h 5m
.:++o: /++++++++/:--:/- Packages: 4191
o:+o+:++.`..```.-/oo+++++/ Shell: bash 5.1.16
.:+o:+o/. `+sssoo+/ Resolution: 2646x1024
.++/+:+oo+o:` /sssooo. DE: Xfce
/+++//+:`oo+o /::--:. WM: Xfwm4
\+/+o+++`o++o ++////. WM Theme: Sweet-Ambar
.++.o+++oo+:` /dddhhh. GTK Theme: Sweet-Dark [GTK2]
.+.o+oo:. `oddhhhh+ Icon Theme: TheOne
\+.++o+o``-````.:ohdhhhhh+ Font: Noto Sans 10
`:o+++ `ohhhhhhhhyo++os: Disk: 791G / 916G (91%)
.o:`.syhhhhhhh/.oo++o` CPU: Intel Core i5-4200U @ 4x 2.6GHz [40.0°C]
/osyyyyyyo++ooo+++/ GPU: Mesa Intel(R) HD Graphics 4400 (HSW GT2)
````` +oo+++o\: RAM: 4823MiB / 7871MiB
`oo++.
提前致谢!

最佳答案

通过运行 sudo mv /var/lib/dpkg/info/dpkg* /tmp 解决了我自己的问题,后跟 sudo apt install -fsudo dpkg --configure -a .
阅读 https://itsfoss.com/dpkg-returned-an-error-code-1/看看为什么会这样。

关于ubuntu - 配置 dpkg 失败并出现错误 "Package dpkg is not configured yet.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72581436/

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