I am compiling a driver for mt7601U on my machine with Manjaro 17.1.2 - Deepin 15.

The instructions for compiling the driver can be found here. I have done all the necessary commenting for the code. When I try to execute the command:

make -C /lib/modules/$(uname -r)/build M=$(pwd) modules

It responded:

make: Entering directory '/usr/lib/modules/4.14.14-1-MANJARO/build'
make: *** No rule to make target 'modules'. Stop
make: Leaving directory '/usr/lib/modules/4.14.14-1-MANJARO/build'

Do I need another package to compile the driver correctly?


Generally, /lib/modules/*/build (where * is a versioning formatting of some sort) is a soft link to the Linux kernel header files to help build packages. The actual files being linked to are commonly found in /usr/src/linux-* (where * is again a versioning format).

It seems that you are on Linux 4.14. You should first verify that by running uname -r to double check the version. If so, you can install the header files by running the following:

$ sudo pacman -S linux414-headers

You may also want to update your system using:

$ sudo pacman-mirrors -f 5 && sudo pacman -Syyu

Then, reboot your system.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.