编译失败“配置:错误:已请求 udev 支持,但未安装 libudev 标头”

Mil*_*ore 3 usbserial libusb

我在我的 ubuntu 机器上做了以下操作:

  1. Git 克隆https://github.com/libusb/libusb.git
  2. 提取后,运行 ./autogen.sh 脚本,失败并出现以下错误:

检查 libudev.h 可用性...不检查 libudev.h 存在...不检查 libudev.h...不配置:错误:请求 udev 支持,但未安装 libudev 标头

我还尝试libudev使用以下命令进行安装sudo apt-get install libudev-dev,但失败并出现以下错误:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libudev1 udev
The following NEW packages will be installed:
  libudev-dev
The following packages will be upgraded:
  libudev1 udev
2 upgraded, 1 newly installed, 0 to remove and 83 not upgraded.
Need to get 1,197 kB of archives.
After this operation, 539 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 udev amd64 229-4ubuntu17
  404  Not Found [IP: 91.189.88.162 80]
Err:2 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev1 amd64 229-4ubuntu17
  404  Not Found [IP: 91.189.88.162 80]
Err:3 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev-dev amd64 229-4ubuntu17
  404  Not Found [IP: 91.189.88.162 80]
Unable to correct missing packages.
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/s/systemd/udev_229-4ubuntu17_amd64.deb  404  Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_229-4ubuntu17_amd64.deb  404  Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_229-4ubuntu17_amd64.deb  404  Not Found [IP: 91.189.88.162 80]

E: Aborting install.
Run Code Online (Sandbox Code Playgroud)

任何帮助将不胜感激。谢谢。

Sun*_*eak 7

sudo apt install libudev-dev适用于 Ubuntu 18.04 LTS


Mil*_*ore 5

我已经开始工作了。首先我安装了libudev-dev硬路。

1.wget http://kr.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_204-5ubuntu20_amd64.debwget http://kr.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_204-5ubuntu20_amd64.deb

  1. 使用安装这些包sudo dpkg -i <*.deb>

  2. 现在,./autogen.sh在 libusb 文件夹下运行。

配置成功完成!