depmod: command not found

For modprobe to accurately install dependent modules, it reads the modules.dep file to identify how modules are linked to one another. The depmod command is used to update this database of dependencies so that modprobe can function properly.

The depmod command searches the contents of /lib/modules// for each module. A module may export a “symbol”, indicating that it can provide a service to other modules. Other modules may call these exported symbols in their own code to leverage their capabilities. So, depmod builds the modules.dep file by aggregating all instances of symbols being exported and used.

Syntax

The syntax of the depmod command is:

# depmod [options]

If you encounter the below error while running the depmod command:

depmod: command not found

you may try installing the below package as per your choice of distribution:

OS Distribution Command
Debian apt-get install kmod
Ubuntu apt-get install kmod
Alpine apk add kmod
Arch Linux pacman -S kmod
Kali Linux apt-get install kmod
CentOS yum install kmod
Fedora dnf install kmod
Raspbian apt-get install kmod
Related Post