0

I am trying to install different wallets on my amazon linux ec2 instance. I already have a working electrum-btc.

[ec2-user@ip-xxx-xx-xx-xxx dash-electrum]$ python --version
Python 2.7.13
[ec2-user@ip-xxx-xx-xx-xxx dash-electrum]$ python3 --version
Python 3.4.8
[ec2-user@ip-xxx-xx-xx-xxx dash-electrum]$ uname -a
Linux ip-xxx-xx-xx-xxx 4.9.85-38.58.amzn1.x86_64 #1 SMP Wed Mar 14 01:17:26 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

But when Iam installing other clones for litecoin and dashcoin pip install command fails.

sudo which pip3 install Electrum-DASH-2.9.4.tar.gz

  Running setup.py install for hidapi ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-y3d9_mm3/hidapi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ffxgn444/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
cythoning hid.pyx to hid.c
building 'hid' extension
creating build
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/hidapi
creating build/temp.linux-x86_64-3.4/hidapi/libusb
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/usr/include/python3.4m -c hid.c -o build/temp.linux-x86_64-3.4/hid.o
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/usr/include/python3.4m -c hidapi/libusb/hid.c -o build/temp.linux-x86_64-3.4/hidapi/libusb/hid.o
hidapi/libusb/hid.c:26:0: warning: "_GNU_SOURCE" redefined
 #define _GNU_SOURCE /* needed for wcsdup() before glibc 2.10 */

<command-line>:0:0: note: this is the location of the previous definition
hidapi/libusb/hid.c:47:10: fatal error: libusb.h: No such file or directory
 #include <libusb.h>
          ^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-y3d9_mm3/hidapi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ffxgn444/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-y3d9_mm3/hidapi/

What am I doing wrong? Can I install only one electrum wallet on one server?

1

Your likely missing the libusb dependency. Electrum doesn't spell it out in their repo, but I always build it with trezorlib and it explicitly requests it. Here's what I got to work.

sudo apt install python3-dev python3-pip cython3 libusb-1.0-0-dev libudev-dev python3-pyqt5
sudo -H python3 -m pip install --upgrade setuptools pip
sudo -H python3 -m pip install https://some-path-to-tarball

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.