安装 linux-headers-4.8.0-45 时出现“操作不允许”

安装 linux-headers-4.8.0-45 时出现“操作不允许”

我不知道我是怎么遇到这个错误的,但不管它是什么,我现在都陷入困境了。我运行了以下命令:

sudo apt-get autoremove
sudo dpkg --configure -a
sudo apt-get install -f

所有这些都是按照不同的顺序进行的。

安装/删除 skype 时可能发生了错误。不是 skypeforlinux beta,而是 skype v4.XXX

dustin@dustin-laptop:~$ sudo apt-get install -f  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
Correcting dependencies... Done  
The following additional packages will be installed:  
  linux-headers-4.8.0-45  
The following NEW packages will be installed:  
  linux-headers-4.8.0-45  
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.  
3 not fully installed or removed.  
Need to get 0 B/10.4 MB of archives.  
After this operation, 73.0 MB of additional disk space will be used.  
Do you want to continue? [Y/n] y  
(Reading database ... 213275 files and directories currently installed.)  
Preparing to unpack .../linux-headers-4.8.0-45_4.8.0-45.48~16.04.1_all.deb  ...  
Unpacking linux-headers-4.8.0-45 (4.8.0-45.48~16.04.1) ...  
dpkg: error processing archive /var/cache/apt/archives/linux-headers-4.8.0-45_4.8.0-45.48~16.04.1_all.deb (--unpack):  
 unable to open '/usr/src/linux-headers-4.8.0-45/arch/sh/include  /asm/addrspace.h.dpkg-new': Operation not permitted  
Errors were encountered while processing: 
 /var/cache/apt/archives/linux-headers-4.8.0-45_4.8.0-45.48~16.04.1_all.deb  
E: Sub-process /usr/bin/dpkg returned an error code (1)  
dustin@dustin-laptop:~$   

请注意,我对 Linux 及其所包含的一切都很陌生...
通常我只会格式化硬盘并重新安装,但我厌倦了这个过程。
如果需要更多信息,请告诉我,如果我在此网站上的状态允许,我会将其放在这里。

答案1

我知道您很久以前就问过这个问题,所以它可能不再与您相关,但我最近确实遇到了同样的问题。您是否正在运行 Sophos Antivirus?这阻止了我更新。我能够通过暂时禁用 Sophos Antivirus 来安装所有内容savdctl disable,然后我安装了所需的内容,然后重新启用savdctl enable

答案2

当我遇到同样的问题时,这对我有用

apt autoremove -f

相关内容