Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing libusb dependency on ubuntu:latest (IDFGH-1893) #4095

Closed
mirronelli opened this issue Sep 19, 2019 · 6 comments
Closed

Missing libusb dependency on ubuntu:latest (IDFGH-1893) #4095

mirronelli opened this issue Sep 19, 2019 · 6 comments

Comments

@mirronelli
Copy link

  • IDF version: v4.1-dev-281-g96b96ae24
  • Operating System: Linux

Problem Description

The toolchain setup on a ubuntu:latest container doesn't produce a working build environment

Expected Behavior

  • export.sh in esp-idf directory does not display errors and warnings
  • OpenOcd tool works

Actual Behavior

export.sh throws this error
WARNING: tool openocd-esp32 version v0.10.0-esp32-20190708 is installed, but the tool failed to run

trying to start openocd directly displays:

./openocd: error while loading shared libraries: libusb-1.0.so.0: cannot open shared object file: No such file or directory

Steps to repropduce

docker run -it ubuntu:latest
apt-get update
apt-get -y install git wget libncurses-dev flex bison gperf python python-pip python-setuptools python-serial python-click python-cryptography python-future python-pyparsing python-pyelftools cmake ninja-build ccache
mkdir /root/esp
cd /root/esp
git clone --recursive https://github.com/espressif/esp-idf.git
cd /root/esp/esp-idf
./install.sh
. ./export.sh 

Steps to fix

apt-get install libusb-1.0

Suggested change

add the libusb dependency to the documentation

apt-get -y install git wget libncurses-dev flex bison gperf python python-pip python-setuptools python-serial python-click python-cryptography python-future python-pyparsing python-pyelftools cmake ninja-build ccache  libusb-1.0
@mirronelli mirronelli changed the title Missing libusb dependency on ubuntu Missing libusb dependency on ubuntu:latest Sep 19, 2019
@github-actions github-actions bot changed the title Missing libusb dependency on ubuntu:latest Missing libusb dependency on ubuntu:latest (IDFGH-1893) Sep 19, 2019
@PerMalmberg
Copy link
Contributor

I had this issue too so it's not local to @mirronelli's system.

@KaeLL
Copy link
Contributor

KaeLL commented Apr 24, 2020

I'm having this exact problem too running the v4.1-beta1 snapshot.

WARNING: tool openocd-esp32 version v0.10.0-esp32-20191114 is installed, but the tool failed to run
ERROR: tool openocd-esp32 has no installed versions. Please run 'install.sh' to install it.

@cjds
Copy link

cjds commented Dec 30, 2020

I couldn't find the package but I did

apt-get install libusb-1.0-0-dev

on Ubuntu 20.04

@projectgus
Copy link
Contributor

It should be enough to do apt install libusb-1.0-0 (no -dev needed) on Debian/Ubuntu.

A fix to the docs is in review now, this issue will be updated when it merges.

espressif-bot pushed a commit that referenced this issue Jan 15, 2021
- Arch uses 'libusb' package, provides libusb-1.0.so
- CentOS has moved to 'libusbx', which is libusb-1 API compatible

Related to #4095
@tyeth
Copy link

tyeth commented May 28, 2023

Thanks for the solve already, don't know why I'm getting this, github codespace building circuitpython, using the idf install.sh, but got a non-zero exit code (one would have expected it to be installed):

WARNING: tool openocd-esp32 version v0.11.0-esp32-20221026 is installed, but returned non-zero exit code (127) with error message:
/home/codespace/.espressif/tools/openocd-esp32/v0.11.0-esp32-20221026/openocd-esp32/bin/openocd: error while loading shared libraries: libusb-1.0.so.0: cannot open shared object file: No such file or directory

@SL2021-Dev
Copy link

NEW to using CODESPACES...
can't run . export.sh

@SL2021-Dev ➜ /workspaces/SL-v2/esp-idf (ac5d805) $ . export.sh
Detecting the Python interpreter
Checking "python" ...
Python 3.10.8
"python" has been detected
Adding ESP-IDF tools to PATH...
WARNING: tool openocd-esp32 version v0.11.0-esp32-20221026 is installed, but returned non-zero exit code (127) with error message:
/home/codespace/.espressif/tools/openocd-esp32/v0.11.0-esp32-20221026/openocd-esp32/bin/openocd: error while loading shared libraries: libusb-1.0.so.0: cannot open shared object file: No such file or directory

Tryed to install... apt install libusb-1.0-0
got
@SL2021-Dev ➜ /workspaces/SL-v2 (main) $ apt install libusb-1.0-0
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants