Nitrokey App 2 doesn't work on Linux

Hi

I get this error when trying to execute the Nitrokey App 2 on Pop_!OS 22.04

Is there any way to get around this?

$ ./nitrokey-app-v2.1.2-x64-linux-binary
Traceback (most recent call last):
  File "nitrokeyapp/__main__.py", line 6, in <module>
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /tmp/_MEIuzELzt/libstdc++.so.6)
[25874] Failed to execute script '__main__' due to unhandled exception!

long answer → Nitrokey 3C NFC und Nitrokey 3A mini in der Praxis unter Linux Mint 21.2 (Victoria) [Linux - Wissensdatenbank]

short answer:
1st do: export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
2nd start: nitrokey-app-v2.1.2-x64-linux-binary

1 Like

Thank you very much, it helped.

Heyhey,

this is my first day of trying to work on Linux (Ubuntu 22.04), so sorry if i don’t really understand stuff.

Just in general: I got my Nitropad and wanted to start it together with my NitroKey Mini3A and am pretty disappointed so far, by how user-unfriendly the installation of the Nitrokey is for someone without Linux experience. I think you cannot really expect anyone without experience to make it work and it would be really nice if you could work to find a solution that is feasible for newbies like me. And it would be nice to communicate where to find the information necessary when people order a setup that will require them to get their hands on that information.

Regarding my case, i really want to make it work now and would appreciate help a lot. So here’s what i did so far. I figured out I’ll need Nitrokey App 2 to make my stick work (which was the first challenge) and thus tried to install it via github. After upgrading several packages, the method of compiling led me to the following output, where i decided to try another way as i seriously lost track how to potentially solve the issue.

error: process-exited-with-error

Ă— Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [62 lines of output]
/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in setup.cfg
!!

          ********************************************************************************
          The license_file parameter is deprecated, use license_files instead.
  
          By 2023-Oct-30, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.
  
          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************
  
  !!
    parsed = self.parsers.get(option_name, lambda x: x)(value)
  running egg_info
  writing lib3/PyYAML.egg-info/PKG-INFO
  writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
  writing top-level names to lib3/PyYAML.egg-info/top_level.txt
  Traceback (most recent call last):
    File "/home/z/nitrokey-app2/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/z/nitrokey-app2/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/z/nitrokey-app2/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
      exec(code, locals())
    File "<string>", line 271, in <module>
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1233, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 319, in run
      self.find_sources()
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 327, in find_sources
      mm.run()
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 549, in run
      self.add_defaults()
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 587, in add_defaults
      sdist.add_defaults(self)
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py", line 113, in add_defaults
      super().add_defaults()
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
      self._add_defaults_ext()
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
      self.filelist.extend(build_ext.get_source_files())
    File "<string>", line 201, in get_source_files
    File "/tmp/pip-build-env-2bchekf5/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
      raise AttributeError(attr)
  AttributeError: cython_sources
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

Now, after i tried to use the binary file, i also get the output which is depicted in this thread. However, I am not able to make the solution described here solve my problem. I installed and upgraded Python, pipx and nitropy. I also imported and set the UDEV rules as mentioned. All of this processes seem to have worked - and i was pretty damn happy I made it until this point. I also repeated them several times, just to be sure. Now, i’ve got two problems:

First: I can’t seem to find the command “nitropy” or “nitropy --help”. I followed every single step provided in the thread posted here by Django at least twice to be sure not to screw anything up, and i also checked whether the installation files are to be found on the computer. Nonetheless, when trying to run “nitropy” i always get the output “Command not found” (also when using sudo, or starting the command in the directory where the file is installed). What are potential pitfalls here that i might not see?

Second, i’m absolutely stuck with the Mini-Starting script provided in the answer. When running the “export” command in the terminal there is no response (which might be a good thing, as i learned). I am also able to download both the binary file and to write and save the mini-script in vim. It also works to change their properties so they should be able to be executed as programs. However, when i try to run the command “nitrokey-app-v2” i also get the output “command not found”.

And i am seriously completely clueless how to solve that. Thanks a lot in advance! And sorry if i made some avoidable mistakes, but i really tried my best before writing here…

Nitropy is now working, although i don’t think i changed anything… :smiley: Well. The Nitrokey2 App, however, isn’t yet.

Thank you for helping with the initial question. I have currently the same issue on PopOS.
I checked out the long an short version you mentioned for the script.
Could you please tell me what the following command is doing and why it is necessary?
“export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6”

Is the newest version of GLIBC just missing to start the Nitrokey App2?
Is it possible to just install the newest version or is there a different problem?

Thx.

I searched for the meaning of the above command online and tried the recommended short version to get the Nitrokey App 2 running.

  1. export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
  2. nitrokey-app-v2.1.4-x64-linux-binary

(The binary is currently in my documents folder, not sure if its relevant)

This was the output:
"qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)"

I searched for this problem online but could not find a solution.
Any ideas? Some help?

Reminder: Using PopOS

Thx