我无法安装 Steam 或任何其他软件。是否出现了 dpkg 错误问题 - 如何解决?

我无法安装 Steam 或任何其他软件。是否出现了 dpkg 错误问题 - 如何解决?

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

root@vishal-Inspiron-3542:/home/vishal# sudo apt install steam
Reading package lists... Done
Building dependency tree       
Reading state information... Done
steam:i386 is already the newest version (1:1.0.0.61-2ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
8 not fully installed or removed.
Need to get 0 B/1,451 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up php7.4-common (7.4.3-4ubuntu2.5) ...
dpkg: error processing package php7.4-common (--configure):
 installed php7.4-common package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of php7.4-readline:
 php7.4-readline depends on php7.4-common (= 7.4.3-4ubuntu2.5); however:
  Package php7.4-common is not configured yet.

dpkg: error processing package php7.4-readline (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.4-cli:
 php7.4-cli depends on php7.4-common (= 7.4.3-4ubuntu2.5); however:
  Package php7.4-common is not configured yet.
 php7.4-cli depends on php7.4-readline; however:
  Package php7.4-readline is not configured yet.

dpkg: error processing package php7.4-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.4:
 php7.4 depends on php7.4-common; however:
  Package php7.4-common is not configured yet.

dpkg: error processing package php7.4 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already

dpkg: dependency problems prevent configuration of php7.4-opcache:
 php7.4-opcache depends on php7.4-common (= 7.4.3-4ubuntu2.5); however:
  Package php7.4-common is not configured yet.

dpkg: error processing package php7.4-opcache (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libapache2-mod-php7.4:
 libapache2-mod-php7.4 depends on php7.4-cli; however:
  Package php7.4-cli is not configured yet.
 libapache2-mod-php7.4 depends on php7.4-common (= 7.4.3-4ubuntu2.5); however:
  Package php7.4-common is not configured yet.
 libapache2-mod-php7.4 depends on php7.4-opcache; however:
  Package php7.4-opcache is not configured yet.

dpkg: error processing package libapache2-mod-php7.4 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of php7.4-json:
 php7.4-json depends on php7.4-common (= 7.4.3-4ubuntu2.5); however:
  Package php7.4-common is not configured yet.

dpkg: error processing package php7.4-json (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 php7.4-common
 php7.4-readline
 php7.4-cli
 php7.4
 php7.4-opcache
 libapache2-mod-php7.4
 php7.4-json
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

您问题中的错误似乎与 Steam 无关。

要修复 PHP 包的错误,请运行

sudo apt-get update
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get dist-upgrade

另请注意,sudo如果您已经用户。长时间使用有危险,请sudo以普通用户身份使用。

相关内容