1. Error content:
root@xxx:/home/my_project/application-necessities# sudo apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
libnghttp2-dev is already the newest version (1.30.0-1ubuntu1).
nghttp2 is already the newest version (1.30.0-1ubuntu1).
libssl-dev is already the newest version (1.1.1-1ubuntu2.1~18.04.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nghttp2-proxy (1.30.0-1ubuntu1) ...
Job for nghttpx.service failed because the control process exited with error code.
See "systemctl status nghttpx.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nghttpx, action "start" failed.
● nghttpx.service - HTTP/2 proxy
Loaded: loaded (/lib/systemd/system/nghttpx.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2021-08-30 23:23:55 CST; 30ms ago
Docs: man:nghttpx
Process: 124287 ExecStart=/usr/sbin/nghttpx --conf=/etc/nghttpx/nghttpx.conf (code=exited, status=255)
Main PID: 124287 (code=exited, status=255)
dpkg: error processing package nghttp2-proxy (--configure):
installed nghttp2-proxy package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of nghttp2:
nghttp2 depends on nghttp2-proxy (>= 1.30.0-1ubuntu1); however:
Package nghttp2-proxy is not configured yet.
dpkg: error processing package nghttp2 (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
nghttp2-proxy
nghttp2
E: Sub-process /usr/bin/dpkg returned an error code (1)
2. Violence problem solving:
sudo mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/
sudo mkdir /var/lib/dpkg/info/
sudo apt-get update
3 install it again
apt-get install xxxx
4 Preferences
https://blog.csdn.net/dou3516/article/details/105120221