我收到一个错误:子进程 /usr/bin/dpkg 返回错误代码 (1)

我收到一个错误:子进程 /usr/bin/dpkg 返回错误代码 (1)

我正在使用 Ubuntu 22.04.1 LTS。我遇到了一个dpkg错误,所以我在网上搜索解决方案,然后我运行sudo apt install -f它并返回:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up javascript-common (11+nmu1) ...
dpkg: error processing package javascript-common (--configure):
 installed javascript-common package post-installation script subprocess returne
d error exit status 1
dpkg: dependency problems prevent configuration of libjs-popper.js:
 libjs-popper.js depends on javascript-common; however:
  Package javascript-common is not configured yet.

dpkg: error processing package libjs-popper.js (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libjs-bootstrap4:
 libjs-bootstrap4 depends on libjs-popper.js (>= 1.14.6+ds2-2); however:
  Package libjs-popper.js is not configured yet.

dpkg: error processing package libjs-bootstrap4 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of phpmyadmin:
 phpmyadmin depends on libjs-bootstrap4; however:
  Package libjs-bootstrap4 is not configured yet.

dpkg: error processing package phpmyadmin (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup erro
r from a previous failure.
                          No apport report written because the error message ind
icates its a followup error from a previous failure.
                                                    No apport report written bec
ause MaxReports is reached already
                                  Errors were encountered while processing:
 javascript-common
 libjs-popper.js
 libjs-bootstrap4
 phpmyadmin

然后我尝试运行sudo apt install --fix-broken,也返回了类似的错误。

我最近才开始使用 Ubuntu,这个错误真的很烦人。如果你能提出一些修复建议,那将非常有帮助。

谢谢。

答案1

我遇到了同样的问题,我只是运行了这些命令。

sudo apt remove libjs-popper.js
sudo apt remove javascript-common
sudo apt autoclean
sudo apt update

希望它有效。

答案2

尝试运行以下命令:

sudo apt-get remove --purge javascript-common
sudo apt-get remove --purge libjs-popper.js
sudo apt-get remove --purge libjs-bootstrap4
sudo apt-get remove --purge phpmyadmin
sudo apt autoremove --purge phpmyadmin dbconfig-common
sudo apt autoclean
sudo apt update

相关内容