Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x Gcc在编译python3源代码时发生了一些错误_Python 3.x_Gcc - Fatal编程技术网

Python 3.x Gcc在编译python3源代码时发生了一些错误

Python 3.x Gcc在编译python3源代码时发生了一些错误,python-3.x,gcc,Python 3.x,Gcc,我想在CDH集群中安装Python3。测试后,无法编译安装的集群,可以正确安装其他新服务器 我尝试卸载,然后重新安装gcc 下面是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.

我想在CDH集群中安装Python3。测试后,无法编译安装的集群,可以正确安装其他新服务器

我尝试卸载,然后重新安装gcc

下面是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.7, which was
generated by GNU Autoconf 2.69.  Invocation command line was

 $ ./configure

 ## --------- ##
 ## Platform. ##
 ## --------- ##

hostname = hadoop1.gsta.cn
uname -m = x86_64
uname -r = 3.10.0-957.27.2.el7.x86_64
uname -s = Linux
uname -v = #1 SMP Mon Jul 29 17:46:05 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: /usr/lib64/qt-3.3/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /opt/jdk1.8.0_181//bin
PATH: /root/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2806: checking build system type
configure:2820: result: x86_64-pc-linux-gnu
configure:2840: checking host system type
configure:2853: result: x86_64-pc-linux-gnu
configure:2883: checking for python3.7
configure:2913: result: no
configure:2883: checking for python3
configure:2913: result: no
configure:2883: checking for python
configure:2899: found /usr/bin/python
configure:2910: result: python
configure:3004: checking for --enable-universalsdk
configure:3051: result: no
configure:3074: checking for --with-universal-archs
configure:3089: result: no
configure:3245: checking MACHDEP
configure:3451: checking for --without-gcc
configure:3474: result: no
configure:3477: checking for --with-icc
configure:3497: result: no
configure:3621: checking for gcc
configure:3637: found /usr/bin/gcc
configure:3648: result: gcc
configure:3877: checking for C compiler version
configure:3886: gcc --version >&5
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
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:3897: $? = 0
configure:3886: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
configure:3897: $? = 0
configure:3886: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3897: $? = 4
configure:3886: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3897: $? = 4
configure:3917: checking whether the C compiler works
configure:3939: gcc    conftest.c  >&5
collect2: fatal error: cannot find 'ld'
compilation terminated.
configure:3943: $? = 1
configure:3981: result: no
configure: failed program was:
| /* confdefs.h */
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _DARWIN_C_SOURCE 1
| #define _PYTHONFRAMEWORK ""
| #define _XOPEN_SOURCE 700
| #define _XOPEN_SOURCE_EXTENDED 1
| #define _POSIX_C_SOURCE 200809L
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3986: error: in `/opt/Python-3.7.4':
configure:3988: error: C compiler cannot create executables
See `config.log' for more detailss
我看到代码'collect2:致命错误:找不到'ld',是问题吗

[root@localhost opt]# yum reinstall binutils

我刚刚重新安装了binutils工具,问题已经解决。

您是否如错误所示“查看
config.log
了解更多详细信息”?没有
config.log
上的信息,我们无法帮助您,我正在重新更新问题。
找不到“ld”
-您是否有
ld
?问题在我重新安装“binutils”时得到解决。>yum或者up2date