Ask coding questions

← Back to all posts
1
Im trying to run a repl which would query the chef API for nodes info - `file doesnt exist` ERROR
AlanJebakumar (0)

When in start the repl, i get this error stating file doesnt exist -

[GCC 4.8.2] on linux
Traceback (most recent call last):
  File "main.py", line 3, in <module>
    import imports.query_nodes
  File "/home/runner/imports/query_nodes.py", line 1, in <module>
    import chef
  File "/home/runner/.local/lib/python3.6/site-packages/chef/__init__.py", line 5, in <module>
    from chef.api import ChefAPI, autoconfigure
  File "/home/runner/.local/lib/python3.6/site-packages/chef/api.py", line 17, in <module>
    from chef.rsa import Key
  File "/home/runner/.local/lib/python3.6/site-packages/chef/rsa.py", line 16, in <module>
    _eay = CDLL('libcrypto.so')
  File "/usr/local/lib/python3.6/ctypes/__init__.py", line348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libcrypto.so: cannot open shared object file: No such file or directory```

This code is perfectly running on my on-prem flask machine.. How do i fix this? Somebody please suggest.

This is my repl URL - `https://repl.it/@AlanJebakumar/querychef`