macOS で pyenv から python を導入する際 binutils が入ってるとコケる
2019/03/10 15:54
2024/12/30 17:54
$ pyenv install 3.7.2
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.2.tar.xz...
-> https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
Installing Python-3.7.2...
python-build: use readline from homebrew
BUILD FAILED (OS X 10.12.6 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/js/twdldwjs53l2bjpvr69prpv477bjpd/T/python-build.20190311004219.80215
Results logged to /var/folders/js/twdldwjs53l2bjpvr69prpv477bjpd/T/python-build.20190311004219.80215.log
Last 10 log lines:
"__Py_InitializeFromConfig", referenced from:
_test_init_from_config in _testembed.o
_test_init_dev_mode in _testembed.o
_test_init_isolated in _testembed.o
ld: symbol(s) not found for architecture x86_64
clang: clangerror: : errorlinker command failed with exit code 1 (use -v to see invocation):
linker command failed with exit code 1 (use -v to see invocation)
make: *** [Programs/_testembed] Error 1
make: *** Waiting for unfinished jobs....
make: *** [python.exe] Error 1
一旦 binutils を消すみたいな対応をみんなやってるっぽい
$ brew uninstall binutils
I was running into this as well, and noticed that my ar was /usr/local/bin/ar rather than the system ar. I ran brew remove binutils and was finally able to run pyenv install 2.7.15 and pyenv install 3.7.1 without problems . I had also upgraded to Xcode 10.1, but I think it was binutils that was giving me trouble. YMMV.
Pinned Articles
About
ウェブ界隈でエンジニアとして労働活動に励んでいる @gomi_ningen 個人のブログです
Tags
LLM
promptfoo
GenAI
JavaScript
PowerShell
elasticsearch
fluentd
kibana
nginx
五十嵐裕美
村川梨衣
イベント
logrotate
IoT
Scala
Java
ICMP
iputils
C言語
WUG
mastodon
Swift
AWS
Windows
Clock
PoEAA
アーキテクチャ
DeviceFarm
iOS
プログラミング言語
OS
Lambda
StepFunctions
Serverless
terraform
ポエム
ネットワーク
RHEL
GraphQL
CloudWatch
Coreutils
Linux
telnet
nc
network
LinuxKernel
fpinscala
ELB
IAM
AppSync