![我无法安装 Steam 或任何其他软件。是否出现了 dpkg 错误问题 - 如何解决?](https://linux22.com/image/939362/%E6%88%91%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%20Steam%20%E6%88%96%E4%BB%BB%E4%BD%95%E5%85%B6%E4%BB%96%E8%BD%AF%E4%BB%B6%E3%80%82%E6%98%AF%E5%90%A6%E5%87%BA%E7%8E%B0%E4%BA%86%20dpkg%20%E9%94%99%E8%AF%AF%E9%97%AE%E9%A2%98%20-%20%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%EF%BC%9F.png)
当我尝试安装 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
以普通用户身份使用。