solokeys / solo2-cli

Solo 2 library and CLI in Rust
https://docs.rs/solo2
Apache License 2.0
173 stars 31 forks source link

Just unable to get this to work (macOS Monterey) #17

Closed raspberrycoulis closed 2 years ago

raspberrycoulis commented 2 years ago

Where to start? I'm trying to install this to test out my new Solo V2 keys, but I have not been able to get it to work.

I appreciate this is still in development, but it would be great if the installation instructions could be updated for a fresh install as it seems that things aren't fully explained to relatively inexperienced people (like myself I guess).

After some initial problems, I had to install Rust by running (as outlined here):

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then I managed to get solo2 to install by running:

cargo install solo2

However, when I run the following command:

solo2 app admin uuid

I get:

Error: Empty list of smartcards

Revisiting the README file, it mentions something about Solo 2 is supported by Ludovic Rousseau's CCID driver, but there has not been a release. The included Info.plist works.

Ok, so what does that actually mean to somebody who isn't very familiar with all this? I've tried to install Ludovic Rousseau's CCID driver by running:

wget https://ccid.apdu.fr/files/ccid-1.4.34.tar.bz2
tar xzvf ccid-1.4.34.tar.bz2
cd ccid-1.4.34.tar.bz2
./configure
make
make install

As outlined here, I've also tried:

./MacOSX/configure
make
sudo make install

But the first command (./MacOSX/configure) results in:

/usr/local/Cellar/libusb/1.0.24/lib/libusb-1.0.0.dylib  /usr/local/Cellar/libusb/1.0.24/lib/libusb-1.0.dylib
*****************************
Dynamic library libusb found in /usr/local/Cellar/libusb/1.0.24/lib
*****************************
Rename it to force a static link

I have tried removing libusb (brew uninstall --ignore-dependencies libusb --force) and trying again, which seems to progress further, but then results in:

configure: error: libusb.h not found, install libusb or use ./configure LIBUSB_CFLAGS=...

I have no idea what that means or what else to do on that so that runs into other problems and the rabbit hole deepens... Should I be doing something with the included Info.plist and if so, what and where?

In an ideal world, it would be great if the installation instructions were looked at again from a fresh installation point of view, so that any dependencies are detailed as it seems something isn't quite right here and I do not know what else to do to get this to work.

I'm running this on macOS Monterey (version 12.0.1) with cargo version 1.56.0 and solo2 version 0.1.0.