免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 6660 | 回复: 12

windows7用perl安装USB::LibUSB模块的问题 [复制链接]

论坛徽章:
0
发表于 2019-01-13 14:43 |显示全部楼层
如题,请高手帮忙看看,需要怎么处理才能安装上USB::LibUSB模块,谢谢!!!
USB-LibUSB.jpg

论坛徽章:
0
发表于 2019-01-13 16:40 |显示全部楼层
我是用输入命令cpan USB::LibUSB安装的,哪位大神帮忙看看了!!!

论坛徽章:
0
发表于 2019-01-15 20:31 |显示全部楼层
D:\Strawberry\plcd>cpan

cpan> install USB::LibUSB

论坛徽章:
0
发表于 2019-01-16 08:20 |显示全部楼层
回复 3# hztj2005

这个试过了,不行啊

论坛徽章:
0
发表于 2019-01-16 18:19 |显示全部楼层
那就自己参考下面网页,下载包来安装:
https://blog.csdn.net/haoweilaizoule/article/details/52303998

论坛徽章:
0
发表于 2019-01-17 14:36 |显示全部楼层
回复 5# hztj2005
这个我也试过了,安装不了,
USB::LibUSB这个模块应该是只能在Linux安装,windows系统是不能安装的

论坛徽章:
0
发表于 2019-01-17 15:08 |显示全部楼层
回复 6# leezhang
你不是想win7中安装吗?

看下面:
https://metacpan.org/pod/USB::LibUSB

On Windows you have to manually download the libusb binaries from http://libusb.info and extract them somewhere.
下载2进制文件,解压缩到某个文件夹。
Assuming that the location of the extracted libusb folder is C:\Users\simon\libusb-1.0, you need to set the USB_LIBUSB_INCLUDE and USB_LIBUSB_LIB environment variables as follows:
按下面方式修改环境变量。
> SET USB_LIBUSB_INCLUDE=-IC:\Users\simon\libusb-1.0\include\libusb-1.0

> SET USB_LIBUSB_LIB=-lC:\Users\simon\libusb-1.0\MinGW64\dll\libusb-1.0.dll.a




You will also need to add
C:\Users\simon\libusb-1.0\MinGW64\dll




to the Path environment variable.
The latest supported version of Strawberry Perl is 5.20. In our tests the build fails for newer versions.
这里说了,Strawberry Perl 5.20可以,更高的版本不可以。
Driver Installation
On Windows you need an additional driver to use a device with libusb. See the Windows section in the libusb wiki.
在Win,你需要一个另外的驱动程序,为了利用libusb取使用一个设备。请参考维基libusb下的部分。



论坛徽章:
0
发表于 2019-01-20 00:05 |显示全部楼层
回复 7# hztj2005
非常感谢你!!!USB::LibUSB安装成功了!!!
我现在
在安装Device::USB模块的时候
又碰到了一个新问题,小白一个,麻烦帮忙看看需要怎么处理,谢谢!!!

Device-USB_InstallErr.jpg

论坛徽章:
0
发表于 2019-01-20 11:10 |显示全部楼层
下面链接中的问题,正和你的问题一样,还是要设置环境变量:
https://stackoverflow.com/questi ... eviceusb-on-windows

论坛徽章:
0
发表于 2019-01-20 12:29 |显示全部楼层
回复 9# hztj2005
环境变量我有添加,可是还是安装不了,报相同的错误,

环境变量

环境变量
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP