处理问题时遇到错误

处理问题时遇到错误

当我尝试安装 wine 时,出现以下错误:

dpkg: error processing package libsasl2-modules:i386 (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Errors were encountered while processing:
libssl1.1:amd64
libssl1.1:i386
libsasl2-modules:amd64
libsasl2-modules:i386
E: Sub-process /usr/bin/dpkg returned an error code (1)

有人能帮我解决这个问题吗?我做到了

dpkg --configure -a  

输出:

dpkg: error: requested operation requires superuser privilege

正在做:

sudo dpkg --configure -a 

做过:

Setting up libssl1.1:i386 (1.1.0e-1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by  
another process: Resource temporarily unavailable
dpkg: error processing package libssl1.1:i386 (--configure):
subprocess installed post-installation script returned error exit 
status 1
dpkg: dependency problems prevent configuration of libsasl2-
modules:amd64:
libsasl2-modules:amd64 depends on libssl1.1 (>= 1.1.0); however:
Package libssl1.1:amd64 is not configured yet.

dpkg: error processing package libsasl2-modules:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libsasl2-
modules:i386:
libsasl2-modules:i386 depends on libssl1.1 (>= 1.1.0); however:
Package libssl1.1:i386 is not configured yet.

dpkg: error processing package libsasl2-modules:i386 (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Errors were encountered while processing:
libssl1.1:i386
libsasl2-modules:amd64
libsasl2-modules:i386

做过:

sudo dpkg --configure -a --force-depends

输出:

Setting up libssl1.1:i386 (1.1.0e-1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by 
another process: Resource temporarily unavailable
dpkg: error processing package libssl1.1:i386 (--configure):
subprocess installed post-installation script returned error exit 
status 1
dpkg: libsasl2-modules:i386: dependency problems, but configuring 
anyway as you requested:
libsasl2-modules:i386 depends on libssl1.1 (>= 1.1.0); however:
Package libssl1.1:i386 is not configured yet.

Setting up libsasl2-modules:i386 (2.1.27~101-g0780600+dfsg-2) ...
dpkg: libsasl2-modules:amd64: dependency problems, but configuring 
anyway as you requested:
libsasl2-modules:amd64 depends on libssl1.1 (>= 1.1.0); however:
Package libssl1.1:amd64 is not configured yet.

Setting up libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-2) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Errors were encountered while processing:
libssl1.1:i386

我做到了:

sudo fuser -v -k /var/cache/debconf/config.dat

输出:

USER        PID ACCESS COMMAND
/var/cache/debconf/config.dat:
                 root      16901 F.... dpkg-preconfigu

现在它说:

dpkg: error: dpkg status database is locked by another process

但 wine 似乎已经安装了

答案1

正如我们读到的

dpkg: error processing package libsasl2-modules:i386 (--configure):
dependency problems - leaving unconfigured

1. 你必须跑

dpkg --configure -a

这给了我们

debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by  
another process: Resource temporarily unavailable

2.因此为了解锁/var/cache/debconf/config.dat

sudo fuser -v -k /var/cache/debconf/config.dat

或者运行

sudo fuser -v /var/cache/debconf/config.dat

并使用给定的 PID 终止进程,例如:

sudo kill PID_HERE & sudo kill -9 PID_HERE


现在,dpkg --configure -a应该能够解决问题,如果不行,请尝试sudo dpkg --configure -a --force-depends


来源及更多信息:

http://manpages.ubuntu.com/manpages/xenial/en/man1/dpkg.1.html

http://manpages.ubuntu.com/manpages/xenial/en/man1/fuser.1.html

相关内容