当方 macOS BigSur11.4です。
pyenvでpython3.6.5をインストールしたいんですが、エラーで引っかかって困っています。
エラー内容
% pyenv install 3.6.5 Downloading openssl-1.0.2k.tar.gz... -> https://pyenv.github.io/pythons/6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0 Installing openssl-1.0.2k... Installed openssl-1.0.2k to /Users/[myname]/.pyenv/versions/3.6.5 python-build: use readline from homebrew Downloading Python-3.6.5.tar.xz... -> https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz Installing Python-3.6.5... python-build: use readline from homebrew BUILD FAILED (OS X 11.4 using python-build 20160602) Inspect or clean up the working tree at /var/folders/79/gtnkfs4x56lb9tft4gtmwsqm0000gn/T/python-build.20210626201203.8628 Results logged to /var/folders/79/gtnkfs4x56lb9tft4gtmwsqm0000gn/T/python-build.20210626201203.8628.log Last 10 log lines: ./Modules/posixmodule.c:8210:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ret = sendfile(in, out, offset, &sbytes, &sf, flags); ^ ./Modules/posixmodule.c:10432:5: warning: code will never be executed [-Wunreachable-code] Py_FatalError("abort() called from Python code didn't abort!"); ^~~~~~~~~~~~~ clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -I./Include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/[myname]/.pyenv/versions/3.6.5/openssl/include -I/Users/[myname]/.pyenv/versions/3.6.5/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/[myname]/.pyenv/versions/3.6.5/openssl/include -I/Users/[myname]/.pyenv/versions/3.6.5/include -DPy_BUILD_CORE -c ./Modules/pwdmodule.c -o Modules/pwdmodule.o 1 warning and 1 error generated. make: *** [Modules/posixmodule.o] Error 1 make: *** Waiting for unfinished jobs....```
試したこと
https://qiita.com/shimajiroxyz/items/788811730c152b18c997
brew install zlib brew install sqlite brew install bzip2 brew install libiconv brew install libzip
上記インストールした際に「brew install zlib」のみエラーになります。
% brew install zlib Warning: zlib 1.2.11 is already installed, it's just not linked. To link this version, run: brew link zlib
そこでlinkを調べました。
% brew link zlib Warning: Refusing to link macOS provided/shadowed software: zlib For compilers to find zlib you may need to set: export LDFLAGS="-L/usr/local/opt/zlib/lib" export CPPFLAGS="-I/usr/local/opt/zlib/include" For pkg-config to find zlib you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig"
ご教示いただけますでしょうか?
よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー