SnowSQL fails with “The library Security could not be found” after upgrading to mac Big Sur

拜拜、爱过 提交于 2020-12-12 10:44:07

问题


After upgrading to macOS Big Sur my snowsql scripts all fail with "The Library Security could not be found"

$ snowsql -q "select 1 x"
User: me
Password: XXX
The library Security could not be found
If the error message is unclear, enable logging using -o log_level=DEBUG and see the log to find out the cause. Contact support for further help.
Goodbye!

This reminds me of an issue I ran into with the snowflake-connector-python library involving oscrypto library being used instead of openssl when I upgraded to macOS Catalina several months ago, the issue is documented here: https://github.com/snowflakedb/snowflake-connector-python/issues/235

When I first saw the issue today I was running an earlier version of SnowSQL (1.1.something) then I upgraded to 1.2.9 and got the same error. I tried adding the "-o log_level=DEBUG" to the SnowSQL command line but it didn't output any additional information.


回答1:


Could you try the following steps?

  • Move the User's snowsql directory to a backup: mv ~/.snowsql ~/.snowsql.prebigsur
  • Move the SnowSQL application to the trash from the Applications folder.
  • Make sure "/Applications/SnowSQL.app" is gone.
  • Then download and install the latest SnowSQL from the darwin repo (https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/darwin_x86_64/index.html)



回答2:


I was running into the same thing and the only help I can find was this thread and a few unanswered github issues.

For me, I'm using SQLAlchemy to connect to Snowflake. Worked just fine until I upgraded to Big Sur.

After digging through the code, it looks like things were stemming from oscrypto 1.20 for me. It was specifically calling our the _security_cffi.py and around line 239, they were doing something like this:

Security = find_library('Security')

I went to their page and saw that there was a new version 1.21

After downloading it, the code changed to this:

security_path = '/System/Library/Frameworks/Security.framework/Security'

Security = ffi.dlopen(security_path)

Now I'm able to run my queries against snowflake without issue.



来源:https://stackoverflow.com/questions/65012259/snowsql-fails-with-the-library-security-could-not-be-found-after-upgrading-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!