繁体   English   中英

子进程/usr/bin/dpkg返回错误码(一)使用sudo apt install --fix-broken时

[英]Sub-process /usr/bin/dpkg returned an error code (1) When using sudo apt install --fix-broken

当试图从我的 Ubuntu 中删除 nodjs 时, sudo apt-get remove nodejs出现错误E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). 执行sudo apt install --fix-broken iam 时出现以下错误。

我遇到这个问题的任何原因。

Reading package lists... Done
Building dependency tree        
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
linux-image-5.11.0-46-generic 
Suggested packages:
fdutils linux-doc | linux-hwe-5.11-source-5.11.0 linux-hwe-5.11-tools
The following NEW packages will be installed:
linux-image-5.11.0-46-generic
0 upgraded, 1 newly installed, 0 to remove and 132 not upgraded.
4 not fully installed or removed.
Need to get 0 B/11.5 MB of archives.
After this operation, 11.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 208109 files and directories currently installed.)
Preparing to unpack .../linux-image-5.11.0-46-generic_5.11.0-46.51~20.04.1_amd64.deb ...
Unpacking linux-image-5.11.0-46-generic (5.11.0-46.51~20.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.11.0-46- 
generic_5.11.0-46.51~20.04.1_amd64.deb (--unpack):
unable to open '/boot/vmlinuz-5.11.0-46-generic.dpkg-new': Operation not permitted
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-5.11.0-46-generic_5.11.0-46.51~20.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

试试看:

apt clean
apt autoclean

cd /var/lib/dpkg/
mv info/ info_bak
mkdir info
apt-get update
apt-get -f install
mv info/* info_bak/
rm -rf info
mv info_bak info

我认为这将解决您的问题,按顺序执行所有命令。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM