configure: error: "udev support requested but libudev not installed

created at 10-17-2021 views: 34

Problem Description:

Configure: error: "udev support requested but libudev not installed appears when configuring during the installation of libusb

  • System: centos

Thinking process:

1. First search for the above error message on google and found the same problem, but there is no solution (so I will write this down after the solution).

2. There is no ready-made solution, then find the installation method of libudev by yourself, and finally find the following one.

Solution:

on ubuntu

apt-get install libudev-dev

on centos

yum install systemd-devel 

Compile time

g++ -o main main.cpp -ludev
created at:10-17-2021
edited at: 10-17-2021: