在 MacOS 上安装 sudo pip ansible 失败,出现“找不到 openssl/opensslv。”错误

在 MacOS 上安装 sudo pip ansible 失败,出现“找不到 openssl/opensslv。”错误

我按照 MicroK8s 安装的步骤进行操作,并在我的计算机上重新安装了 openSSL,但无济于事。
我看到以下警告,这可能与此有关,但我不知道如何修复它。

writing requirements to src/cryptography.egg-info/requires.txt
writing src/cryptography.egg-info/PKG-INFO
writing top-level names to src/cryptography.egg-info/top_level.txt
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found

reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'build/temp.macosx-10.14-intel-2.7/_padding.c'
creating build/temp.macosx-10.14-intel-2.7
generating cffi module 'build/temp.macosx-10.14-intel-2.7/_constant_time.c'
generating cffi module 'build/temp.macosx-10.14-intel-2.7/_openssl.c'
building '_openssl' extension
creating build/temp.macosx-10.14-intel-2.7/build
creating build/temp.macosx-10.14-intel-2.7/build/temp.macosx-10.14-intel-2.7
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c build/temp.macosx-10.14-intel-2.7/_openssl.c -o build/temp.macosx-10.14-intel-2.7/build/temp.macosx-10.14-intel-2.7/_openssl.o -Wconversion -Wno-error=sign-conversion
build/temp.macosx-10.14-intel-2.7/_openssl.c:498:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'cc' failed with exit status 1

提前感谢您的帮助!

相关内容