scito / extract_otp_secrets

Extract one time password (OTP) secrets from QR codes exported by two-factor authentication (2FA) apps such as "Google Authenticator". The exported QR codes from authentication apps can be captured by camera, read from images, or read from text files. The secrets can be exported to JSON or CSV, or printed as QR codes to console.
https://scito.ch/content/extract-secret-keys-google-authenticator-qr-export
GNU General Public License v3.0
1.07k stars 131 forks source link

Needed libgl1 for Ubuntu 22.04 #176

Open joeaudet opened 7 months ago

joeaudet commented 7 months ago

Ran into the following error:

administrator@totp-extract:~/extract_otp_secrets$ python3 src/extract_otp_secrets.py -d -v IMG_3307.jpg
Traceback (most recent call last):
  File "/home/administrator/extract_otp_secrets/src/extract_otp_secrets.py", line 119, in <module>
    raise e
  File "/home/administrator/extract_otp_secrets/src/extract_otp_secrets.py", line 61, in <module>
    import cv2
  File "/home/administrator/.local/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/home/administrator/.local/lib/python3.10/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Needed to install libgl1 in order to get it to work. Brand new Ubuntu 22.04 install, only thing installed was following these instructions. Any other info I can provide to help further support this great project?

scito commented 6 months ago

Thanks for your report. Which command did you use to install libgl1?

(Interestingly, the installation of the lib is not necessary in GitHub Ubuntu CI testing which is also using ubuntu-22.04.)

joeaudet commented 6 months ago

sudo apt install libgl1

As soon as I ran that, I was able to rerun the extract and it worked. Prior to even the example you included had that error. Thought it was my QR code at first. Debug function was vastly helpful here. :) Thanks!