mac install instructions fail for libusb-devel

本文记录了在OSX 10.7上使用MacPorts安装libusb遇到的问题及解决步骤。主要问题为安装过程中出现错误提示,解决方法包括删除冲突文件并重新安装。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

What steps will reproduce the problem?

1. Run "sudo port install libusb-devel +universal"

--->  Configuring libusb-devel
Error: Please do not install this port since it has been replaced by 'libusb'.

2. Run "sudo port install libusb +universal"
--->  Fetching archive for libusb
--->  Attempting to fetch libusb-1.0.9_0+universal.darwin_11.i386-x86_64.tbz2 from http://packages.macports.org/libusb
--->  Fetching distfiles for libusb
--->  Attempting to fetch libusb-1.0.9.tar.bz2 from http://distfiles.macports.org/libusb
--->  Verifying checksum(s) for libusb
--->  Extracting libusb
--->  Configuring libusb
--->  Building libusb
--->  Staging libusb into destroot
--->  Installing libusb @1.0.9_0+universal
--->  Activating libusb @1.0.9_0+universal
Error: org.macports.activate for port libusb returned: Image error: /opt/local/lib/libusb-1.0.0.dylib already exists and does not belong to a registered port.  Unable to activate port libusb. Use 'port -f activate libusb' to force the activation.
Please see the log file for port libusb for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libusb/libusb/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port libusb failed

3. Run "sudo port -f activate libusb"
--->  The following versions of libusb are currently installed:
--->      libusb @1.0.9_0
--->      libusb @1.0.9_0+universal
Error: port activate failed: Registry error: Please specify the full version as recorded in the port registry.

4. Run "sudo port clean libusb" and "sudo port install libusb"
--->  Activating libusb @1.0.9_0
Error: org.macports.activate for port libusb returned: Image error: /opt/local/lib/libusb-1.0.0.dylib already exists and does not belong to a registered port.  Unable to activate port libusb. Use 'port -f activate libusb' to force the activation.
Please see the log file for port libusb for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libusb/libusb/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port libusb failed



What is the expected output? What do you see instead?
Expect correct installation

What version of the product are you using? On what operating system?
OSX 10.7

Fixed by running

"sudo rm -f /opt/local/lib/libusb-1.0.0.dylib"
"sudo port clean libusb"
"sudo port install libusb +universal"

Basically the Mac install instructions need to be updated and should include a warning that the short install may leave files around that will need to be deleted before installing with port.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值