本地预编译报错 do not set execute permissions for source files

一、问题出现场景

我在工程文件下,新建了三个文件,提交代码时,在本地使用脚本预编译,出现3个报错:do not set execute permissions for source files,每一个文件对应一个这样的报错。

二、对报错的理解

do not set execute permissions for source files:不要给源文件设置可执行权限。
理解:需要将文件的权限修改为不可执行。
对文件权限的理解,详见这篇博客 如何理解文件权限设置 —— 644 755 777 等

三、解决办法

1)在控制台,进入文件目录后,输入
ls -l
查看文件目前的权限,发现文件有“可执行权限”:x (一般为755)

2)输入 chmod <文件权限类型,一般改为644> <文件名>

### CH340 Serial Port Driver for Linux Installation and Configuration For installing and configuring the CH340 serial port driver on a Linux system, several steps must be followed carefully. The process involves downloading appropriate drivers from reliable sources, ensuring compatibility with the current kernel version, compiling these drivers if necessary, and loading them into the operating system. #### Downloading Suitable Drivers Suitable drivers can often be found either within the official repositories of many distributions or through third-party providers specializing in hardware support packages. For instance, some users may find pre-built modules available via package managers like `apt` (for Debian-based systems) or `yum` (Red Hat/CentOS). However, when such options do not exist, obtaining source code directly from manufacturers becomes essential[^1]. ```bash sudo apt-get update && sudo apt-get install ch340g-serial-driver ``` If this method fails due to unavailability, proceed as follows: #### Obtaining Source Code Directly From Manufacturers Manufacturers typically provide downloadable archives containing both binary files and documentation regarding installation procedures. After acquiring the tarball or zip archive, extract its contents using standard utilities (`tar`, `unzip`). Before proceeding further, verify that all dependencies required for building custom kernel modules are present on your machine—this includes development tools like GCC mentioned earlier: ```bash sudo apt-get install build-essential linux-headers-$(uname -r) ``` Once prepared, follow any specific instructions provided alongside the downloaded materials concerning compilation flags or environment variables needed during make processes. #### Compiling Custom Kernel Modules After setting up prerequisites successfully, navigate inside extracted directories where Makefiles reside then execute commands similar below which will initiate module creation based upon given specifications outlined previously: ```bash make clean make ``` Upon completion, newly created `.ko` objects should appear ready for insertion into running kernelspace via insmod command line utility but before doing so ensure proper permissions granted over device nodes associated with USB interfaces managed by udev ruleset framework otherwise errors might occur preventing successful communication between user space applications trying accessing physical ports connected externally. #### Loading New Kernelspace Objects Into Running Systems With everything set correctly now comes time inserting compiled binaries into active memory spaces allowing immediate effectuation thereof without requiring full reboots unless explicitly stated otherwise within manufacturer guidelines accompanying software bundles distributed originally. Use following syntax while replacing placeholder text accordingly depending actual filenames encountered post-build phase completed above: ```bash sudo insmod ch34x.ko ``` Finally, confirm operation status checking output returned after invoking dmesg | tail sequence revealing messages logged recently indicating whether new additions recognized properly along expected lines described beforehand throughout entire procedure documented hereunder.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值