首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在LinuxLMDE3Cindy中安装MySmartUSB Light时出错(Makefile:没有此类文件或目录)

在LinuxLMDE3Cindy中安装MySmartUSB Light时出错(Makefile:没有此类文件或目录)
EN

Unix & Linux用户
提问于 2019-08-27 15:47:41
回答 1查看 582关注 0票数 0

我需要在LinuxLMDE3Cindy中安装MySmartUSB Light作为linux中avr的编程器,所以我从这个链接下载了这个驱动程序(Linux_3.x.x_4.x.x_VCP_Driver_Source):基于它的说明如下:

最近一次修改是在2019年7月12日,这个包包含一个修改过的4.10.0内核的CP210x驱动程序(Ubuntu17.04)。它包括:

  • 对CP2102N的支持

注意:这个驱动程序是如何在CP210x驱动程序中执行GPIO操作的一个示例,因为kernel.org上的驱动程序此时不支持GPIO。这个驱动程序只在Ubuntu14.04上的Linux3.13.0内核上编写和测试。这个驱动程序是Linux3.13.0内核中现有驱动程序的一个修改版本,它是在kernel.org上维护的。建议使用与特定内核版本相匹配的驱动程序: www.kernel.org构建说明: Ubuntu: 1. make ( cp210x驱动程序) 2. cp cp210x.ko to /lib/cp210x.ko/cp210x.ko/usb/串行3. insmod /lib/cp210x.ko/

当我想在驱动程序文件夹中运行sudo make时,我会得到以下错误:

代码语言:javascript
复制
so@notebook:~/Downloads/Compressed/Linux_3.x.x_4.x.x_VCP_Driver_Source$ sudo make
[sudo] password for so:        
Sorry, try again.
[sudo] password for so:       
make -C /lib/modules/`uname -r`/build M= modules
make[1]: Entering directory '/usr/src/linux-headers-4.9.0-9-amd64'
/usr/src/linux-headers-4.9.0-9-common/scripts/Makefile.build:44: /usr/src/linux-headers-4.9.0-9-common/scripts/basic/Makefile: No such file or directory
make[5]: *** No rule to make target '/usr/src/linux-headers-4.9.0-9-common/scripts/basic/Makefile'.  Stop.
/usr/src/linux-headers-4.9.0-9-common/Makefile:444: recipe for target 'scripts_basic' failed
make[4]: *** [scripts_basic] Error 2
/usr/src/linux-headers-4.9.0-9-common/scripts/Makefile.build:44: /usr/src/linux-headers-4.9.0-9-common/arch/x86/entry/syscalls/Makefile: No such file or directory
make[4]: *** No rule to make target '/usr/src/linux-headers-4.9.0-9-common/arch/x86/entry/syscalls/Makefile'.  Stop.
arch/x86/Makefile:231: recipe for target 'archheaders' failed
make[3]: *** [archheaders] Error 2
Makefile:152: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.9.0-9-amd64'
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 2

那么我该如何解决这个问题呢?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2019-08-27 16:37:47

您以前是否使用此系统来运行make来构建驱动程序?你可能需要一些额外的包裹。

本指南可能有些帮助,因为它描述了编译软件包之前的必要步骤,尽管在您的例子中最重要的一步可能是第一步:

代码语言:javascript
复制
sudo apt-get install build-essential checkinstall

运行之后,再次使用sudo make编译驱动程序。

如果它不起作用,就可能没有合适的内核头。内核头基本上只是内核本身的C头文件,这对于编译与内核接口的东西(比如驱动程序)是必要的。这里是一个安装指南,它解释了升级/安装内核头和运行一样容易:

代码语言:javascript
复制
sudo apt update
sudo apt install linux-headers-$(uname -r)
票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/537692

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档