5

I am trying to install Mediatek MT7630E driver https://github.com/neurobin/MT7630E,

When I try

sudo apt install build-essential linux-headers-amd64

I get this:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package linux-headers-amd64 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source



E: Package 'linux-headers-amd64' has no installation candidate

How can I resolve this?

Filip Sotiroski
  • 153
  • 1
  • 1
  • 5

1 Answers1

7

The instructions given at the github site are generic, one-size-maybe-fits-all steps. They may or may not be correct for each and every Linux distribution. For Ubuntu, the correct command is:

sudo apt install linux-headers-generic

Installing the 'generic' package will also install the headers appropriate for your running kernel version but also will assure that updates to your kernel version will also trigger corresponding updates to the headers package.

chili555
  • 60,188
  • Ok, I did this, and when I ran ./install I got:

    -----Sorry! Run with root privilege (for example with 'sudo ./install')

    So, I ran it with sudo ./install, but then i got a message: make command not found, so i ran: sudo apt-get install build-essential.

    After that, I was able to run the install, but I needed to install libelf-dev. And now I have it. thank you!

    – Filip Sotiroski Jan 01 '19 at 19:45
  • Awesome! Glad it's working. – chili555 Jan 01 '19 at 19:59
  • Package 'linux-headers-generic' has no installation candidate. I love how literally every single answer on Stack Exchange leads to more unexpected errors instead of solutions. This is a nightmare. And, the best part... googling the error this "solution" didn't bother to adrres led me to a page that told me to try something that led to another error, so I googled that new error, and the results led me... RIGHT BACK HERE! I guess the only question now is, have I just gone totally insane, or, is this stuff all just literally 100% broken and unfixable? This is all on brand new OS installs, BTW. – John Smith Nov 08 '23 at 08:23
  • @JohnSmith Please start your own new question. Include the results of: lsb_release -a – chili555 Nov 08 '23 at 14:20