1

I've a very strange problem.

Yesterday everything was fine, today I've launched Ubuntu and I've got this message:

package linux-image-4.4.0-65-generic needs to be reinstalled, but I can't find an archive for it

I've searched for some solution online but I haven't found anything.

6
  • Have you tried sudo apt install linux-image-4.4.0-65-generic? The "no archive" would DS like it means it's just not in your cache. Mar 3, 2017 at 13:06
  • An update was offered yesterday for linux-generic for a brief time which included this kernel, but then it seems to have been pulled. One of my xenial systems got this update, the other didn't. You may have gotten caught in the transition. You shpuld probably fall back to -64. I'm not decided what to do on my one system that got this now-orphaned update. Mar 3, 2017 at 13:20
  • @NonnyMoose thanks for the help but it didn't work. Anyway I've found a solution by myself.
    – Jacob
    Mar 3, 2017 at 13:35
  • 1
    @ Organic Marble thanks! With your suggestion I managed to find a solution!
    – Jacob
    Mar 3, 2017 at 13:36
  • Just download and re install the kernel using dpkg -i and you should be fine. ubuntuupdates.org/package/canonical_kernel_team/xenial/main/…
    – Tomas
    Mar 14, 2017 at 15:01

2 Answers 2

1

I've found a solution:

I installed a new kernel.

Following this Ubuntu handbook guide I deleted old kernels versions

After that I discovered that the linux-image-4.4.0-65-generic was in a very bad inconsistent state.

So I removed it using this command: sudo dpkg --remove --force-remove-reinstreq <image-to-remove>.

Now it works :)

0

I've also followed the tip to run the following command:

sudo dpkg --remove --force-remove-reinstreq <image-to-remove>.

However, my packages was so "corrupted" that when I ran this command I was followed by a list of dependencies that refused to remove the package. And with that upgrading the system was also a failure.

Finally I found out that I could edit /var/lib/dpkg/status and change the row of the damaged package:

Status: deinstall reinstreq half-installed

To

Status: install ok installed

With this changed, rerunning apt-get remove was suddenly successful.

A footnote of this is that in my case, it was linux-headers that needed to be reinstalled and linux-image-extra that was a dependency.

Also, after manipulating the file I've got a few warnings:

dpkg-query: warning: parsing file '/var/lib/dpkg/status' near line 1950 package 'linux-headers-4.4.0-65-generic': missing description

dpkg-query: warning: parsing file '/var/lib/dpkg/updates/0066' near line 7 package 'linux-headers-4.4.0-65-generic': missing description

They however disappeared right after running apt-get autoremove/upgrade, so I suspect that this is not the best way of removing packages that is impossible to remove.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .