我目前正在切换我的VPS主机,我一直在Ubuntu22.04LTS上遇到这个错误,我得到的错误是needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) --我已经在互联网上尝试了所有的东西,甚至安装了一个更新的内核。
完整产出:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libnginx-mod-http-geoip2 libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail
libnginx-mod-stream libnginx-mod-stream-geoip2 nginx-common nginx-core
Suggested packages:
fcgiwrap nginx-doc
The following NEW packages will be installed:
libnginx-mod-http-geoip2 libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail
libnginx-mod-stream libnginx-mod-stream-geoip2 nginx nginx-common nginx-core
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/696 kB of archives.
After this operation, 2,395 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Preconfiguring packages ...
Selecting previously unselected package nginx-common.
(Reading database ... 160422 files and directories currently installed.)
Preparing to unpack .../0-nginx-common_1.18.0-6ubuntu14.1_all.deb ...
Unpacking nginx-common (1.18.0-6ubuntu14.1) ...
Selecting previously unselected package libnginx-mod-http-geoip2.
Preparing to unpack .../1-libnginx-mod-http-geoip2_1.18.0-6ubuntu14.1_amd64.deb ...
Unpacking libnginx-mod-http-geoip2 (1.18.0-6ubuntu14.1) ...
Selecting previously unselected package libnginx-mod-http-image-filter.
Preparing to unpack .../2-libnginx-mod-http-image-filter_1.18.0-6ubuntu14.1_amd64.deb ...
Unpacking libnginx-mod-http-image-filter (1.18.0-6ubuntu14.1) ...
Selecting previously unselected package libnginx-mod-http-xslt-filter.
Preparing to unpack .../3-libnginx-mod-http-xslt-filter_1.18.0-6ubuntu14.1_amd64.deb ...
Unpacking libnginx-mod-http-xslt-filter (1.18.0-6ubuntu14.1) ...
Selecting previously unselected package libnginx-mod-mail.
Preparing to unpack .../4-libnginx-mod-mail_1.18.0-6ubuntu14.1_amd64.deb ...
Unpacking libnginx-mod-mail (1.18.0-6ubuntu14.1) ...
Selecting previously unselected package libnginx-mod-stream.
Preparing to unpack .../5-libnginx-mod-stream_1.18.0-6ubuntu14.1_amd64.deb ...
Unpacking libnginx-mod-stream (1.18.0-6ubuntu14.1) ...
Selecting previously unselected package libnginx-mod-stream-geoip2.
Preparing to unpack .../6-libnginx-mod-stream-geoip2_1.18.0-6ubuntu14.1_amd64.deb ...
Unpacking libnginx-mod-stream-geoip2 (1.18.0-6ubuntu14.1) ...
Selecting previously unselected package nginx-core.
Preparing to unpack .../7-nginx-core_1.18.0-6ubuntu14.1_amd64.deb ...
Unpacking nginx-core (1.18.0-6ubuntu14.1) ...
Selecting previously unselected package nginx.
Preparing to unpack .../8-nginx_1.18.0-6ubuntu14.1_amd64.deb ...
Unpacking nginx (1.18.0-6ubuntu14.1) ...
Setting up nginx-common (1.18.0-6ubuntu14.1) ...
chown: invalid group: ‘root:adm’
dpkg: error processing package nginx-common (--configure):
installed nginx-common package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of libnginx-mod-http-xslt-filter:
libnginx-mod-http-xslt-filter depends on nginx-common (= 1.18.0-6ubuntu14.1); however:
Package nginx-common is not configured yet.
dpkg: error processing package libnginx-mod-http-xslt-filter (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnginx-mod-http-geoip2:
libnginx-mod-http-geoip2 depends on nginx-common (= 1.18.0-6ubuntu14.1); however:
Package nginx-common is not configured yet.
dpkg: error processing package libnginx-mod-http-geoip2 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnginx-mod-stream-geoip2:
libnginx-mod-stream-geoip2 depends on nginx-common (= 1.18.0-6ubuntu14.1); however:
Package nginx-common is not configured yet.
dpkg: error processing package libnginx-mod-stream-geoip2 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nginx-core:
nginx-core depends on libnginx-mod-http-xslt-filter (= 1.18.0-6ubuntu14.1); however:
Package libnginx-mod-http-xslt-filter is not configured yet.
nginx-core depends on libnginx-mod-http-geoip2 (= 1.18.0-6uNo 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
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
buntu14.1); however:
Package libnginx-mod-http-geoip2 is not configured yet.
nginx-core depends on libnginx-mod-stream-geoip2 (= 1.18.0-6ubuntu14.1); however:
Package libnginx-mod-stream-geoip2 is not configured yet.
nginx-core depends on nginx-common (= 1.18.0-6ubuntu14.1); however:
Package nginx-common is not configured yet.
dpkg: error processing package nginx-core (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnginx-mod-mail:
libnginx-mod-mail depends on nginx-common (= 1.18.0-6ubuntu14.1); however:
Package nginx-common is not configured yet.
dpkg: error processing package libnginx-mod-mail (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nginx:
nginx depends on nginx-core (<< 1.18.0-6ubuntu14.1.1~) | nginx-full (<< 1.18.0-6ubuntu14.1.1~) | nginx-light (<< 1.18.0-6ubuntu14.1.1~) | nginx-extras (<< 1.18.0-6ubuntu14.1.1~); however:
Package nginx-core is not configured yet.
Package nginx-full is not installed.
Package nginx-light is not installed.
Package nginx-extras is not installed.
nginx depends on nginx-core (>= 1.18.0-6ubuntu14.1) | nginx-full (>= 1.18.0-6ubuntu14.1) | nginx-light (>= 1.18.0-6ubuntu14.1) | nginx-extras (>= 1.18.0-6ubuntu14.1); however:
Package nginx-core is not configured yet.
Package nginx-full is not installed.
Package nginx-light is not installed.
Package nginx-extras is not installed.
dpkg: error processing package nginx (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnginx-mod-http-image-filter:
libnginx-mod-http-image-filter depends on nginx-common (= 1.18.0-6ubuntu14.1); however:
Package nginx-common is not configured yet.
dpkg: error processing package libnginx-mod-http-image-filter (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnginx-mod-stream:
libnginx-mod-stream depends on nginx-common (= 1.18.0-6ubuntu14.1); however:
Package nginx-common is not configured yet.
dpkg: error processing package libnginx-mod-stream (--configure):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for ufw (0.36.1-4build1) ...
Errors were encountered while processing:
nginx-common
libnginx-mod-http-xslt-filter
libnginx-mod-http-geoip2
libnginx-mod-stream-geoip2
nginx-core
libnginx-mod-mail
nginx
libnginx-mod-http-image-filter
libnginx-mod-stream
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)发布于 2022-11-25 15:31:27
我最近也有这个问题。准确的错误是行
chown: invalid group: ‘root:adm’在默认情况下,Ubuntu没有adm组。您可以手动添加组adm。
sudo addgroup adm发布于 2023-04-23 11:39:41
sudo组添加adm
当我安装nginx时,它对我起了作用。然后,我继续进行之前停止的其余安装,命令出错:
数独apt安装-f
希望这能有所帮助。
https://askubuntu.com/questions/1419366
复制相似问题