无法打开'/boot/vmlinuz-5.x.x.x-generic.dpkg-new':不允许操作[需要解决方案而不从系统中删除防病毒]

Unable to open '/boot/vmlinuz-5.x.x.x-generic.dpkg-new': Operation not permitted [Need solution without removing antivirus from system]

在过去的几天里,我在升级时遇到了一些未满足的依赖项问题。我尝试单独安装这些软件包,但找不到解决方案。

我知道一种解决方案,就是从系统中删除防病毒软件。但是不允许我删除防病毒软件。我想要另一个不从系统中删除防病毒软件的解决方案。

解包时显示:

Preparing to unpack .../linux-image-5.11.0-44-generic_5.11.0-44.48~20.04.2_amd64.deb ...
Unpacking linux-image-5.11.0-44-generic (5.11.0-44.48~20.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.11.0-44-generic_5.11.0-44.48~20.04.2_amd64.deb (--unpack):
 unable to open '/boot/vmlinuz-5.11.0-44-generic.dpkg-new': Operation not permitted
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-5.11.0-44-generic_5.11.0-44.48~20.04.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试了自动清理、强制安装、--fix-broken.. 在论坛中找到的所有可能方法。 对于 sudo apt --fix-broken install:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  bnd java-wrappers libbindex-java libcommons-codec-java
  libcommons-collections3-java libcommons-compress-java libcommons-lang-java
  libdd-plist-java libfelix-framework-java libfelix-gogo-runtime-java
  libfelix-osgi-obr-java libfelix-resolver-java libfindbugs-java
  libgoogle-gson-java libgradle-core-java libgradle-plugins-java
  libhttpclient-java libhttpcore-java libjarjar-java libjatl-java
  libjavaewah-java libjcifs-java libjcip-annotations-java
  libjformatstring-java libjgit-java libjna-java libjna-jni libjs-jquery
  libjsoup-java libkryo-java libminlog-java libnative-platform-java
  libnative-platform-jni libnekohtml-java libobjenesis-java
  libosgi-annotation-java libosgi-compendium-java libosgi-core-java
  libplexus-container-default-java libplexus-container-default1.5-java
  libpolyglot-maven-java libreflectasm-java librhino-java libsimple-http-java
  libwagon-http-java libxbean-reflect-java libxerces2-java
  libxml-commons-external-java
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-image-5.11.0-44-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-44-generic
0 upgraded, 1 newly installed, 0 to remove and 19 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 ... 261995 files and directories currently installed.)
Preparing to unpack .../linux-image-5.11.0-44-generic_5.11.0-44.48~20.04.2_amd64
.deb ...
Unpacking linux-image-5.11.0-44-generic (5.11.0-44.48~20.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.11.0-44-gen
eric_5.11.0-44.48~20.04.2_amd64.deb (--unpack):
 unable to open '/boot/vmlinuz-5.11.0-44-generic.dpkg-new': Operation not permit
ted
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-5.11.0-44-generic_5.11.0-44.48~20.04.2_amd6
4.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

这很烦人,我无法安装任何其他软件包。 关于如何解决这个问题有什么建议吗?

这是适合我的解决方案:

基本上,防病毒软件会阻止安装软件包,因为我的系统已经安装了一个软件包(McAfee 代理)。

首先,我使用以下命令检查了杀毒软件的状态,是否是运行:

# /opt/McAfee/ens/tp/init/mfetpd-control.sh status
# /opt/McAfee/ens/esp/init/mfeespd-control.sh status

如果是 运行 则停止这些服务:

# /opt/McAfee/ens/tp/init/mfetpd-control.sh stop
# /opt/McAfee/ens/esp/init/mfeespd-control.sh stop

然后再查看状态是否停止。如果停止,那么我将开始必要的更新和所需的安装:

sudo apt --fix-broken install

最后,我通过这些再次启动杀毒:

# /opt/McAfee/ens/esp/init/mfeespd-control.sh start
# /opt/McAfee/ens/tp/init/mfetpd-control.sh start

参考:https://kc.mcafee.com/corporate/index?page=content&id=KB88223