make -C M= modules /bin/sh: 1: make -C M= modules: not found Makefile:6: recipe for target 'modules' failed make: *** [modules] Error 127 make -C M= modules /bin/sh: 1: make -C M= modules: not found Makefile:6: recipe for target 'modules' failed make: *** [modules] Error 127
时间: 2024-04-20 10:26:06 浏览: 33
这个错误通常表示在执行make命令时找不到目标文件或目录。请确保你在正确的目录中执行make命令,并且目标文件或目录存在。如果目标文件或目录不存在,你可能需要检查Makefile文件的配置或安装相应的依赖项。另外,还可以尝试使用绝对路径执行make命令,以确保正确的目标文件或目录被找到。如果问题仍然存在,请提供更多的上下文和详细信息,以便我能够更好地帮助你解决问题。
相关问题
/bin/sh: 1: make -C /lib/modules/4.4.0-142-generic/build M=/my_block modules: not found
这个错误提示表明你在编译一个内核模块时出现了问题。可能是因为你在编译过程中缺少了必要的依赖项或者没有正确安装内核头文件。建议你检查一下你的编译环境和相关依赖项是否已经正确安装,并且确认你使用的是正确版本的内核头文件。你可以尝试执行以下命令来安装内核头文件和相关依赖项:
```
sudo apt-get update
sudo apt-get install linux-headers-$(uname -r) build-essential
```
然后再重新编译你的内核模块。
make /bin/sh: 1: bc: not found make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.1.0-kali9-amd64/build M=/root/桌面/rtl8821CU modules make[1]: *** /lib/modules/6.1.0-kali9-amd64/build: 没有那个文件或目录。 停止。 make: *** [Makefile:2217:modules] 错误 2
这个错误提示是在编译驱动程序时出现的,可能是因为缺少编译驱动程序所需要的依赖项。你可以尝试以下步骤来解决这个问题:
1. 确保你已经安装了编译驱动程序所需要的依赖项,例如 bc 工具。你可以使用以下命令来安装 bc 工具:
```
sudo apt-get install bc
```
2. 确保你已经正确设置了内核源码的路径,因为编译驱动程序需要使用内核源码。你可以使用以下命令来查看内核源码的路径:
```
sudo apt-get install linux-source
ls /usr/src/
```
3. 如果以上步骤都没有解决问题,你可以尝试在 make 命令中加入 V=1 选项以获取更详细的编译日志,从而找到问题所在。例如:
```
make V=1 ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.1.0-kali9-amd64/build M=/root/桌面/rtl8821CU modules
```
希望这些步骤可以帮助你解决问题。