Score:1

How can I resolve this error: packages have unmet dependencies: linux-image-oem-20.04b: Depends?

eg flag

I am getting this error

 The following packages have unmet dependencies:
  linux-image-oem-20.04b : Depends:
 linux-image-5.10.0-1049-oem but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I have tried almost everything and it is not letting me install,remove or update anything.I have also tried manually installing linux-image package but it throws me this error ->

 dpkg: error processing archive
 linux-image-5.10.0-1049-oem_5.10.0-1049.51_amd64.deb (--install): 
 unable to open '/boot/vmlinuz-5.10.0-1049-oem.dpkg-new': Operation not
 permitted Errors were encountered while processing: 

 linux-image-5.10.0-1049-oem_5.10.0-1049.51_amd64.deb

I tried updating the whole system too but it gives me this error

 Transaction failed: The package system is broken  The following
 packages have unmet dependencies: linux-image-oem-20.04b: Depends:
 linux-image-5.10.0-1049-oem but it is not installed

Tried installing the OEM kernel using the below command:

sudo apt install linux-image-5.10.0-1049-oem

and it gives this error:

Preparing to unpack .../linux-image-5.10.0-1049-oem_5.10.0-1049.51_amd64.deb ...
Unpacking linux-image-5.10.0-1049-oem (5.10.0-1049.51) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.10.0-1049-oem_5.10.0-1049.51_amd64.deb (--unpack):
 unable to open '/boot/vmlinuz-5.10.0-1049-oem.dpkg-new': Operation not permitte
d
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-5.10.0-1049-oem_5.10.0-1049.51_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Someone avatar
my flag
me too getting same error after upgrading
Someone avatar
my flag
try doing sudo apt --fix-broken install
David avatar
cn flag
What version of Ubuntu are you using?
Someone avatar
my flag
@David 20.04 plz help me too
hu flag
Does `sudo dpkg -P linux-image-5.10.0-1049-oem` work?
Someone avatar
my flag
My problem is solved thanks anyway
Suryanshu Dinkar avatar
eg flag
@David Ubuntu 20.04.2 LTS (fossa-charmander X74)
Suryanshu Dinkar avatar
eg flag
@mikewhatever it says "dpkg: warning: ignoring request to remove linux-image-5.10.0-1049-oem which isn't installed" after running your command
David avatar
cn flag
20.04.2 shows you are behind in upgrades. After you can do upgrades you need to fix that.
Suryanshu Dinkar avatar
eg flag
@David upgrade isn't working
David avatar
cn flag
Yes I said WHEN!
Suryanshu Dinkar avatar
eg flag
@David Everything was working fine yesterday
Suryanshu Dinkar avatar
eg flag
@AkshajSingla What did you do?
Someone avatar
my flag
I answered the question
user535733 avatar
cn flag
Try to install the OEM kernel: `sudo apt install linux-image-5.10.0-1049-oem`. It will likely fail, and we need to see that error output. Add it to your Question above. An effective way to solve dependency conflicts is to follow the chain until apt tells you exactly which package conflicts and why. Once you resolve THAT conflict, it all works properly again.
Suryanshu Dinkar avatar
eg flag
@user535733 updated my question.
user535733 avatar
cn flag
So your actual problem is not "unmet dependencies". Your actual problem seems to apt: `unable to open '/boot/vmlinuz-5.10.0-1049-oem.dpkg-new': Operation not permitted`. Interesting. That's a permission issue, not a package conflict. Are you the admin on this system? Is this a pre-installed new-hardware system (hence the OEM kernel)? Or is there anything unusual or complex about it, like a VM or container or WSL or older hardware or you installed it on the hardware yourself?
Suryanshu Dinkar avatar
eg flag
@user535733 Unable to open just because there isn't any file like that in boot folder.
Suryanshu Dinkar avatar
eg flag
@user535733 Though there are 3 files with the same name but having different versions: 1) vmlinuz-5.10.0-1014-oem 2) vmlinuz-5.10.0-1045-oem 3) vmlinuz
Score:2
my flag

The error is because of an Anti-Virus utility that is not allowing apt to access the /boot directory. Disable any anti-virus services you are using.

For example, if you're using MacCaffe, run the following commands to fix it (The commands will remove the antivirus utility):

sudo dpkg --purge mfedx 
sudo dpkg --purge mcafeetp 
sudo dpkg --purge mcafeeespaac 
sudo dpkg --purge mcafeeespfileaccess 
Sudo dpkg --purge mcafeeesp 
sudo dpkg --purge mcafeert 
sudo dpkg --purge mfecma 
sudo dpkg --purge mfert
Score:0
cn flag

my fix was to disable the antivirus. everything works fine after that

David avatar
cn flag
Where in the question did the OP say they were using anti virus?
Suryanshu Dinkar avatar
eg flag
i wasn't using any anti virus.
Someone avatar
my flag
@David The fact that OP didn't mention antivirus anywhere doesn't make this an NAA or wrong/inaccurate answer. As far as I can see OP didn't even mention that they're on Ubuntu, does that make the question off-topic? No. As you can see in the highest voted answer, the problem is with the antivirus.
David avatar
cn flag
As the OP says he is NOT using anti virus. Take your rant somewhere else.
Thomas Aichinger avatar
cn flag
This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://askubuntu.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://askubuntu.com/help/whats-reputation), you can also [add a bounty](https://askubuntu.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/low-quality-posts/1206887)
Score:-1
eg flag

After trying so many things, what worked for me is that I moved my etc/apt folder to some other place, obviously, you can't simply right-click and move that folder. You have to move that folder using terminal, use the below command:

sudo mv etc/apt <destination_path>

After that, try running the below command, and don't worry about the errors.

sudo apt-get update
sudo apt --fix-broken install

And now you have to again move the apt folder back to its place (if the apt folder is auto-generated in /etc/ then delete that folder) using the below command:

sudo mv <source_path_apt_folder> etc/

Now, again run the below commands:

  • sudo apt-get update.
  • sudo apt full-upgrade(optional)
Someone avatar
my flag
**Do NOT Run** the commands mentioned. (1) The commander mentioned are incomplete (the `/` before `/etc` is missing). (2) Removing/Moving APT's configuration will cause many errors! (3) Many times the commands may corrupt the package `apt` because of missing files.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.