Unable to install Latest generic kernel for 18.04

When I am trying to upgrade Latest generic kernel for 18.04 because I was having issues with Ubuntu freezing while I am doing my development works, when lot of tabs open etc. So i found a solution in stackoverflow requesting to update generic kernal, so I did this by sudo apt install — install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04 mentioned here

I got the following error how to solve this

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package —
E: Unable to locate package install-recommends
3

2 Answers

You have extra spaces in your command as I read it, and thus told it to install "install-recommends" for which there is no package, thus error is correct.

When 3rd party blogs make errors, you need to correct for that yourself, or stick to official Ubuntu blogs which have been tested/reviewed by someone else in the team.

The '--' is the GNU way of writing the option, and the 'install-recommends' is the option and connected to the '--', ie. the space between them shouldn't be there.

The --install-recommends will install the packages for Xorg (, )

I haven't provided the command by choice; as the command refers to HWE (hardware enablement kernel) and not GA (general availability) kernel I tend to think of as generic (or what originally ships). You'll also note official documentation has different commands for desktop & server, the OPs unofficial post ignores (thus it would be poor for Ubuntu 18.04 Servers)

The official documentation is

2

The correct command is

sudo apt-get install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like