2017-05-14 07:44:50 +00:00
# Installation
2018-02-23 11:55:46 +00:00
## 1. Prerequisites
2017-06-15 18:12:12 +00:00
Install the following packages (depending on your distribution):
2018-02-23 11:55:46 +00:00
### OS dependencies
This software needs Python, libusb, and libudev along with development files.
You can install them on these distributions as follows:
2017-11-12 20:11:31 +00:00
2018-02-23 11:55:46 +00:00
##### Debian
2017-06-15 18:12:12 +00:00
2018-03-03 00:24:08 +00:00
$ apt-get install python3-pip python3-dev python3-tk libusb-1.0-0-dev libudev-dev
2017-06-15 18:12:12 +00:00
2018-03-22 12:31:36 +00:00
##### RedHat
2017-06-15 18:12:12 +00:00
2018-03-03 00:24:08 +00:00
$ yum install python3-pip python3-devel python3-tk libusb-devel libudev-devel \
2017-06-15 18:12:12 +00:00
gcc redhat-rpm-config
2018-03-22 12:31:36 +00:00
##### Fedora
$ dnf install python3-pip python3-devel python3-tk libusb-devel libudev-devel \
gcc redhat-rpm-config
2018-02-23 11:55:46 +00:00
##### OpenSUSE
2017-09-13 23:15:45 +00:00
2018-02-04 09:49:21 +00:00
$ zypper install python-pip python-devel python-tk libusb-1_0-devel libudev-devel
2017-09-13 23:15:45 +00:00
2017-11-12 20:11:31 +00:00
If you are using python3 or your system `pip` command points to `pip3.x`
(`/etc/alternatives/pip -> /usr/bin/pip3.6`) you will need to install these
dependencies instead:
2018-02-04 09:49:21 +00:00
$ zypper install python3-pip python3-devel python3-tk libusb-1_0-devel libudev-devel
2017-11-12 20:11:31 +00:00
2018-02-23 11:55:46 +00:00
### GPG
2017-11-12 20:11:31 +00:00
2018-02-23 11:55:46 +00:00
If you intend to use GPG make sure you have GPG installed and up to date. This software requires a GPG version >= 2.1.11.
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
You can verify your installed version by running:
```
$ gpg2 --version | head -n1
gpg (GnuPG) 2.1.15
```
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
* Follow this installation guide for [Debian ](https://gist.github.com/vt0r/a2f8c0bcb1400131ff51 )
* Install GPG for [macOS ](https://sourceforge.net/p/gpgosx/docu/Download/ )
* Install packages for Ubuntu 16.04 [here ](https://launchpad.net/ubuntu/+source/gnupg2 )
* Install packages for Linux Mint 18 [here ](https://community.linuxmint.com/software/view/gnupg2 )
2017-11-12 20:11:31 +00:00
2018-02-23 11:55:46 +00:00
# 2. Install the TREZOR agent
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
1. Make sure you are running the latest firmware version on your Trezor:
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
* [TREZOR firmware releases ](https://wallet.trezor.io/data/firmware/releases.json ): `1.4.2+`
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
2. Make sure that your `udev` rules are configured [correctly ](https://doc.satoshilabs.com/trezor-user/settingupchromeonlinux.html#manual-configuration-of-udev-rules ).
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
3. Then, install the latest [trezor_agent ](https://pypi.python.org/pypi/trezor_agent ) package:
```
2018-03-22 12:31:36 +00:00
$ pip3 install Cython
2018-03-03 00:24:08 +00:00
$ pip3 install trezor_agent
2018-02-23 11:55:46 +00:00
```
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
Or, directly from the latest source code:
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
```
2017-05-14 07:44:50 +00:00
$ git clone https://github.com/romanz/trezor-agent
2018-03-03 00:24:08 +00:00
$ pip3 install --user -e trezor-agent/agents/trezor
2018-02-23 11:55:46 +00:00
```
# 3. Install the KeepKey agent
1. Make sure you are running the latest firmware version on your KeepKey:
* [KeepKey firmware releases ](https://github.com/keepkey/keepkey-firmware/releases ): `3.0.17+`
2. Make sure that your `udev` rules are configured [correctly ](https://support.keepkey.com/support/solutions/articles/6000037796-keepkey-wallet-is-not-being-recognized-by-linux ).
2017-05-14 07:44:50 +00:00
Then, install the latest [keepkey_agent ](https://pypi.python.org/pypi/keepkey_agent ) package:
2018-02-23 11:55:46 +00:00
```
2018-03-03 00:24:08 +00:00
$ pip3 install keepkey_agent
2018-02-23 11:55:46 +00:00
```
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
Or, directly from the latest source code:
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
```
2017-05-14 07:44:50 +00:00
$ git clone https://github.com/romanz/trezor-agent
2018-03-03 00:24:08 +00:00
$ pip3 install --user -e trezor-agent/agents/keepkey
2018-02-23 11:55:46 +00:00
```
# 4. Install the Ledger Nano S agent
1. Make sure you are running the latest firmware version on your Ledger Nano S:
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
* [Ledger Nano S firmware releases ](https://github.com/LedgerHQ/blue-app-ssh-agent ): `0.0.3+` (install [SSH/PGP Agent ](https://www.ledgerwallet.com/images/apps/chrome-mngr-apps.png ) app)
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
2. Make sure that your `udev` rules are configured [correctly ](https://ledger.zendesk.com/hc/en-us/articles/115005165269-What-if-Ledger-Wallet-is-not-recognized-on-Linux- ).
3. Then, install the latest [ledger_agent ](https://pypi.python.org/pypi/ledger_agent ) package:
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
```
2018-03-03 00:24:08 +00:00
$ pip3 install ledger_agent
2018-02-23 11:55:46 +00:00
```
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
Or, directly from the latest source code:
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
```
2017-05-14 07:44:50 +00:00
$ git clone https://github.com/romanz/trezor-agent
2018-03-03 00:24:08 +00:00
$ pip3 install --user -e trezor-agent/agents/ledger
2018-02-23 11:55:46 +00:00
```
2017-05-14 07:44:50 +00:00
2018-02-23 11:55:46 +00:00
# 5. Installation Troubleshooting
2017-05-14 07:44:50 +00:00
If there is an import problem with the installed `protobuf` package,
see [this issue ](https://github.com/romanz/trezor-agent/issues/28 ) for fixing it.
2017-06-12 19:39:11 +00:00
If you can't find the command-line utilities (after running `pip install --user` ),
please make sure that `~/.local/bin` is on your `PATH` variable
(see a [relevant ](https://github.com/pypa/pip/issues/3813 ) issue).
2017-10-17 19:37:11 +00:00
If you can't find command-line utilities and are on macOS/OSX check `~/Library/Python/2.7/bin` and add to `PATH` if necessary (see a [relevant ](https://github.com/romanz/trezor-agent/issues/155 ) issue).