cannot find -ludev
时间: 2023-09-03 22:08:46 浏览: 107
The error message "cannot find -ludev" typically means that the linker cannot find the library "libudev" that your program is trying to link against.
To fix this issue, you need to make sure that the libudev library is installed on your system and that the linker can find it. On Linux systems, you can typically install the libudev library by running the following command:
```
sudo apt-get install libudev-dev
```
If you are using a different Linux distribution, the command to install the libudev library may be different. Once the library is installed, you may also need to specify the path to the library using the `-L` option when compiling and linking your program. For example:
```
gcc -o myprogram myprogram.c -ludev -L/usr/lib/x86_64-linux-gnu/
```
阅读全文