Manjaro 17.1安装Lattice Diamond 3.10后编程工具无法运行求助
Let's get that programming tool working again—here's why you're hitting the libusb-0.1.so.4 error and how to fix it properly:
Modern Arch-based distros like Manjaro 17.1 ship with the newer libusb 1.0 library by default, dropping support for the older 0.1 series that Lattice Diamond 3.10 relies on. Just dropping the library file into the Diamond directory usually doesn't cut it because the system's dynamic linker won't recognize it, or there might be permission/architecture mismatches. Try these steps in order:
1. Install the Official Compatibility Package
Manjaro's repositories have a pre-built package for the older libusb 0.1 series. Open a terminal and run this command to install it:
sudo pacman -S libusb-compat
This package installs libusb-0.1.so.4 and registers it with the system's linker, so Diamond will automatically find it without you needing to manually copy files.
2. Fallback: Create a Symbolic Link (If the Package Fails)
If for some reason libusb-compat isn't available in your repos (unlikely for Manjaro 17.1), you can link an existing compatible library to the path Diamond expects. First, check if you have any libusb 0.1 files on your system:
find /usr/lib -name "libusb-0.1*"
If you find a file like libusb-0.1.so.4.4.4, create a symlink in /usr/lib (so the system linker can pick it up):
sudo ln -s /usr/lib/libusb-0.1.so.4.4.4 /usr/lib/libusb-0.1.so.4
Then update the linker cache to apply the change:
sudo ldconfig
3. Check USB Permissions
Even after fixing the library issue, the tool might fail if it doesn't have permission to access your Lattice programmer. Test this by running the tool with sudo:
sudo /usr/local/diamond/3.10_x64/bin/lin64/toolapps/[your-programming-tool-executable]
If this works, set up a udev rule to allow non-root access. Create a file /etc/udev/rules.d/99-lattice-programmer.rules with this content (replace the vendor/product IDs with your programmer's actual IDs—find them using lsusb):
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6010", MODE="0666"
Reload the udev rules to apply the change:
sudo udevadm control --reload-rules && sudo udevadm trigger
4. Verify Library Architecture
If you manually downloaded libusb-0.1.so.4, make sure it's a 64-bit library—since you're running the 64-bit version of Diamond (3.10_x64), 32-bit libraries won't work. Check the architecture with these commands:
file /usr/local/diamond/3.10_x64/bin/lin64/toolapps/libdvmapp.so file /path/to/your/libusb-0.1.so.4
Both should output ELF 64-bit LSB shared object to confirm they match.
After completing these steps, restart the Lattice Diamond programming tool—it should launch without the library error.
内容的提问来源于stack exchange,提问作者Cristian Piste

