简体   繁体   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

when trying to remove nodjs from my Ubuntu sudo apt-get remove nodejs Getting error E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).当试图从我的 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). When performing sudo apt install --fix-broken iam getting below error.执行sudo apt install --fix-broken iam 时出现以下错误。

Any reason why iam getting this issue.我遇到这个问题的任何原因。

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)

Try it:试试看:

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

I think this will solve your problem, execute all commands in order.我认为这将解决您的问题,按顺序执行所有命令。

暂无
暂无

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

相关问题 无法apt-get安装软件包E:子进程/ usr / bin / dpkg返回了错误代码(1) - Unable to apt-get install packages E: Sub-process /usr/bin/dpkg returned an error code (1) E:子进程/ usr / bin / dpkg每当使用apt-get时都返回错误代码(1) - E: Sub-process /usr/bin/dpkg returned an error code (1) whenever using apt-get 子进程/ usr / bin / dpkg返回错误代码(1),apt-get错误: - Sub-process /usr/bin/dpkg returned an error code (1), apt-get error: apt-get 错误:子进程 /usr/bin/dpkg 返回错误代码 (1) - apt-get error: Sub-process /usr/bin/dpkg returned an error code (1) 无法在 Dockerfile 中安装软件包 [E: 子进程 /usr/bin/dpkg 返回错误代码 (1)] - Cannot install package inside Dockerfile [E: Sub-process /usr/bin/dpkg returned an error code (1)] MongoDB错误:mongodb-10gen E:子进程/ usr / bin / dpkg返回错误代码(1) - MongoDB errors: mongodb-10gen E: Sub-process /usr/bin/dpkg returned an error code (1) 使用 apt 尝试 --fix-broken 时出现 dpkg 问题 - issue with dpkg when trying --fix-broken with apt 运行 apt --fix-broken install 时出现 pkgProblemResolver 错误 - pkgProblemResolver error when running apt --fix-broken install apt-get 安装总是失败,并显示“/usr/bin/dpkg 返回错误代码” - apt-get install always fail with "/usr/bin/dpkg returned an error code" 如果 apt-get --fix-broken 给我一个“未知”错误,我该如何修复损坏的依赖项? - How do I fix broken dependencies if apt-get --fix-broken is giving me a "not known" error?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM