amazonlinux2にてpyenvをインストールしてpythonをインストールしようとするとgcc周りでエラーが
発生してインストールが完了しません。
どのように修正したらよいでしょうか。
$ pyenv --version
pyenv 1.2.14-11-gb5f69fe5
uname -a
Linux ip-10-0-0-125.ap-northeast-1.compute.internal 4.14.138-114.102.amzn2.x86_64 #1 SMP Thu Aug 15 15:29:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ gcc --version
gcc (Homebrew gcc 5.5.0_4) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
================
[ec2-user@ip-10-0-0-125 ~]$ pyenv install 3.6.5
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 (Amazon Linux 2 using python-build 1.2.14-11-gb5f69fe5)
Inspect or clean up the working tree at /tmp/python-build.20191104102007.28294
Results logged to /tmp/python-build.20191104102007.28294.log
Last 10 log lines:
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... linux
checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in /tmp/python-build.20191104102007.28294/Python-3.6.5': configure: error: C compiler cannot create executables See
config.log' for more details
●config.log
===============
[ec2-user@ip-10-0-0-125 ~]$ cat /tmp/python-build.20191104101045.19707/Python-3.6.5/config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by python configure 3.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/home/ec2-user/.pyenv/versions/3.6.5 --libdir=/home/ec2-user/.pyenv/versions/3.6.5/lib
---------
Platform.
---------
hostname = ip-10-0-0-125.ap-northeast-1.compute.internal
uname -m = x86_64
uname -r = 4.14.138-114.102.amzn2.x86_64
uname -s = Linux
uname -v = #1 SMP Thu Aug 15 15:29:58 UTC 2019
/usr/bin/uname -p = x86_64
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /home/ec2-user/.pyenv/libexec
PATH: /home/ec2-user/.pyenv/plugins/python-build/bin
PATH: /home/ec2-user/.pyenv/shims
PATH: /home/ec2-user/.pyenv/bin
PATH: /home/linuxbrew/.linuxbrew/bin
PATH: /home/linuxbrew/.linuxbrew/sbin
PATH: /home/linuxbrew/.linuxbrew/bin
PATH: /home/linuxbrew/.linuxbrew/sbin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /usr/local/sbin
PATH: /usr/sbin
PATH: /home/ec2-user/.local/bin
PATH: /home/ec2-user/bin
PATH: /home/ec2-user/.local/bin
PATH: /home/ec2-user/bin
-----------
Core tests.
-----------
configure:2795: checking build system type
configure:2809: result: x86_64-pc-linux-gnu
configure:2829: checking host system type
configure:2842: result: x86_64-pc-linux-gnu
configure:2872: checking for python3.6
configure:2902: result: no
configure:2872: checking for python3
configure:2888: found /home/linuxbrew/.linuxbrew/bin/python3
configure:2899: result: python3
configure:2999: checking for --enable-universalsdk
configure:3046: result: no
configure:3069: checking for --with-universal-archs
configure:3084: result: no
configure:3234: checking MACHDEP
configure:3443: result: linux
configure:3464: checking for --without-gcc
configure:3487: result: no
configure:3490: checking for --with-icc
configure:3510: result: no
configure:3634: checking for gcc
configure:3650: found /home/linuxbrew/.linuxbrew/bin/gcc
configure:3661: result: gcc
configure:3890: checking for C compiler version
configure:3899: gcc --version >&5
gcc (Homebrew gcc 5.5.0_4) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3910: $? = 0
configure:3899: gcc -v >&5
Reading specs from /home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_4/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_4/libexec/gcc/x86_64-unknown-linux-gnu/5.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --with-isl=/home/linuxbrew/.linuxbrew/opt/isl@0.18 --with-bugurl=https://github.com/Linuxbrew/homebrew-core/issues --prefix=/home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_4 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5 --with-gmp=/home/linuxbrew/.linuxbrew/opt/gmp --with-mpfr=/home/linuxbrew/.linuxbrew/opt/mpfr --with-mpc=/home/linuxbrew/.linuxbrew/opt/libmpc --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew gcc 5.5.0_4' --with-boot-ldflags='-static-libstdc++ -static-libgcc ' --disable-nls --disable-multilib
Thread model: posix
gcc version 5.5.0 (Homebrew gcc 5.5.0_4)
configure:3910: $? = 0
configure:3899: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3910: $? = 1
configure:3899: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3910: $? = 1
configure:3930: checking whether the C compiler works
configure:3952: gcc -I/home/linuxbrew/.linuxbrew/opt/readline/include -I/home/ec2-user/.pyenv/versions/3.6.5/include -L/home/linuxbrew/.linuxbrew/opt/readline/lib -L/home/ec2-user/.pyenv/versions/3.6.5/lib conftest.c >&5
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:3956: $? = 1
configure:3994: result: no
configure: failed program was:
| /* confdefs.h /
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _BSD_TYPES 1
| #define _DARWIN_C_SOURCE 1
| #define _XOPEN_SOURCE 700
| #define _XOPEN_SOURCE_EXTENDED 1
| #define _POSIX_C_SOURCE 200809L
| / end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3999: error: in `/tmp/python-build.20191104101045.19707/Python-3.6.5':
configu
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。