Error when using Az k8s-configuration on mac
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az k8s-configuration flux create
Errors:
The command failed with an unexpected error. Here is the traceback:
Cannot load native module 'Crypto.PublicKey._ec_ws': Trying '_ec_ws.cpython-310-darwin.so': cannot load library '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.cpython-310-darwin.so': dlopen(/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.cpython-310-darwin.so, 2): image not found. Additionally, ctypes.util.find_library() did not manage to locate a library called '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.cpython-310-darwin.so', Trying '_ec_ws.abi3.so': cannot load library '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.abi3.so': dlopen(/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.abi3.so, 2): image not found. Additionally, ctypes.util.find_library() did not manage to locate a library called '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.abi3.so', Trying '_ec_ws.so': cannot load library '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.so': dlopen(/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.so, 2): image not found. Additionally, ctypes.util.find_library() did not manage to locate a library called '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.so'
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.33.1/libexec/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.33.1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 556, in execute
self.commands_loader.load_arguments(command)
File "/usr/local/Cellar/azure-cli/2.33.1/libexec/lib/python3.10/site-packages/azure/cli/core/__init__.py", line 515, in load_arguments
self.command_table[command].load_arguments() # this loads the arguments via reflection
File "/usr/local/Cellar/azure-cli/2.33.1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 313, in load_arguments
super(AzCliCommand, self).load_arguments()
File "/usr/local/Cellar/azure-cli/2.33.1/libexec/lib/python3.10/site-packages/knack/commands.py", line 104, in load_arguments
cmd_args = self.arguments_loader()
File "/usr/local/Cellar/azure-cli/2.33.1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 125, in arguments_loader
op = self.get_op_handler(self.op_path)
File "/usr/local/Cellar/azure-cli/2.33.1/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
handler = import_module(mod_to_import)
File "/usr/local/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/cf9536/.azure/cliextensions/k8s-configuration/azext_k8s_configuration/providers/FluxConfigurationProvider.py", line 38, in <module>
from ..validators import (
File "/Users/cf9536/.azure/cliextensions/k8s-configuration/azext_k8s_configuration/validators.py", line 18, in <module>
from Crypto.PublicKey import RSA, ECC, DSA
File "/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/PublicKey/ECC.py", line 58, in <module>
_ec_lib = load_pycryptodome_raw_lib("Crypto.PublicKey._ec_ws", """
File "/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/_raw_api.py", line 308, in load_pycryptodome_raw_lib
raise OSError("Cannot load native module '%s': %s" % (name, ", ".join(attempts)))
OSError: Cannot load native module 'Crypto.PublicKey._ec_ws': Trying '_ec_ws.cpython-310-darwin.so': cannot load library '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.cpython-310-darwin.so': dlopen(/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.cpython-310-darwin.so, 2): image not found. Additionally, ctypes.util.find_library() did not manage to locate a library called '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.cpython-310-darwin.so', Trying '_ec_ws.abi3.so': cannot load library '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.abi3.so': dlopen(/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.abi3.so, 2): image not found. Additionally, ctypes.util.find_library() did not manage to locate a library called '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.abi3.so', Trying '_ec_ws.so': cannot load library '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.so': dlopen(/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.so, 2): image not found. Additionally, ctypes.util.find_library() did not manage to locate a library called '/Users/cf9536/.azure/cliextensions/k8s-configuration/Crypto/Util/../PublicKey/_ec_ws.so'
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Put any pre-requisite steps here…
az k8s-configuration flux create
Expected Behavior
Environment Summary
macOS-11.6.2-x86_64-i386-64bit, Darwin 20.6.0
Python 3.10.2
Installer: HOMEBREW
azure-cli 2.33.1
Extensions:
k8s-configuration 1.4.1
connectedk8s 1.2.2
k8s-extension 1.0.4
azure-devops 0.23.0
ssh 1.0.0
Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0
Additional Context
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
Troubleshoot common Azure Arc-enabled Kubernetes issues
Run the az connectedk8s connect command with the appropriate values to connect the cluster to Azure Arc. CryptoHash module error. When ...
Read more >az cli suddenly stopped working on mac. Getting ImportError
The error message indicates that there is a problem with the OpenSSL library that the Azure CLI is trying to use.
Read more >Using az CLI with self signed certificate
I'm on Mac OS X 11.6 and these are the steps I've tried: I have the certificate for the server in my keychain...
Read more >How to install and experiment with Azure CLI on macOS
... to install and configure Azure command line interface (CLI) on macOS. We'll also take a look at Azure CLI Extensions and how...
Read more >Setting up Azure CLI on mac - Sudhanshu Mishra
How to setup environment variables on Mac OSX ... Azure CLI is built with python3 and has a few dependencies which are ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem is using Python 3.10, while the k8s-configuration extension requires 3.8 when azure-cli requires 3.10. And you cannot install azure-cli of older version than 2.33 ( the extension requires 2.16-2.29 )
Hi, we’re sending this friendly reminder because we haven’t heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don’t hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!