gpt4 book ai didi

python - 配置失败: C compiler cannot create executables(configure: exit 77)有什么问题

转载 作者:太空宇宙 更新时间:2023-11-04 12:48:31 49 4
gpt4 key购买 nike

在CentOs中,我尝试用python2.7./configure然后遇到这个问题

有关详细信息,请参阅“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 2.7, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure

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

hostname = localhost.localdomain
uname -m = x86_64
uname -r = 2.6.32-431.29.2.el6.x86_64
uname -s = Linux
uname -v = #1 SMP Tue Sep 9 21:36:05 UTC 2014

/usr/bin/uname -p = unknown
/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: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin


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

configure:2790: checking build system type
configure:2804: result: x86_64-unknown-linux-gnu
configure:2824: checking host system type
configure:2837: result: x86_64-unknown-linux-gnu
configure:2945: checking for --enable-universalsdk
configure:2986: result: no
configure:2996: checking for --with-universal-archs
configure:3013: result: 32-bit
configure:3170: checking MACHDEP
configure:3362: result: linux2
configure:3368: checking EXTRAPLATDIR
configure:3383: result:
configure:3404: checking for --without-gcc
configure:3448: result: no
configure:3542: checking for gcc
configure:3569: result: /opt/centos/devtoolset-1.1/root/usr/bin/gcc
configure:3798: checking for C compiler version
configure:3807: /opt/centos/devtoolset-1.1/root/usr/bin/gcc --version >&5
./configure: line 3809: /opt/centos/devtoolset-1.1/root/usr/bin/gcc: No such file or directory
configure:3818: $? = 127
configure:3807: /opt/centos/devtoolset-1.1/root/usr/bin/gcc -v >&5
./configure: line 3809: /opt/centos/devtoolset-1.1/root/usr/bin/gcc: No such file or directory
configure:3818: $? = 127
configure:3807: /opt/centos/devtoolset-1.1/root/usr/bin/gcc -V >&5
./configure: line 3809: /opt/centos/devtoolset-1.1/root/usr/bin/gcc: No such file or directory
configure:3818: $? = 127
configure:3807: /opt/centos/devtoolset-1.1/root/usr/bin/gcc -qversion >&5
./configure: line 3809: /opt/centos/devtoolset-1.1/root/usr/bin/gcc: No such file or directory
configure:3818: $? = 127
configure:3838: checking whether the C compiler works
configure:3860: /opt/centos/devtoolset-1.1/root/usr/bin/gcc conftest.c >&5
./configure: line 3862: /opt/centos/devtoolset-1.1/root/usr/bin/gcc: No such file or directory
configure:3864: $? = 127
configure:3902: 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 600
| #define _XOPEN_SOURCE_EXTENDED 1
| #define _POSIX_C_SOURCE 200112L
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3907: error: in `/home/wbxbuilds/Python-2.7.6':
configure:3909: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value=/opt/centos/devtoolset-1.1/root/usr/bin/gcc
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=set
ac_cv_env_CPP_value=/opt/centos/devtoolset-1.1/root/usr/bin/cpp
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_prog_ac_ct_CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
ARCH_RUN_32BIT=''
ARFLAGS=''
BASECFLAGS=''
BASECPPFLAGS=''
BLDLIBRARY=''
BLDSHARED=''
BUILDEXEEXT=''
CC='/opt/centos/devtoolset-1.1/root/usr/bin/gcc'
CCSHARED=''
CFLAGS=''
CFLAGSFORSHARED=''
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=''
CONFIG_ARGS=' '\''CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc'\'' '\''CPP=/opt/centos/devtoolset-1.1/root/usr/bin/cpp'\'''
CPP='/opt/centos/devtoolset-1.1/root/usr/bin/cpp'
CPPFLAGS=''
CXX='/opt/centos/devtoolset-1.1/root/usr/bin/c++'
DEFS=''
DLINCLDIR=''
DLLLIBRARY=''
DYNLOADFILE=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
EXTRAMACHDEPPATH=''
EXTRAPLATDIR=''
FRAMEWORKALTINSTALLFIRST=''
FRAMEWORKALTINSTALLLAST=''
FRAMEWORKINSTALLAPPSPREFIX=''
FRAMEWORKINSTALLFIRST=''
FRAMEWORKINSTALLLAST=''
FRAMEWORKUNIXTOOLSPREFIX='/usr/local'
GNULD=''
GREP=''
HAS_HG=''
HAVE_GETHOSTBYNAME=''
HAVE_GETHOSTBYNAME_R=''
HAVE_GETHOSTBYNAME_R_3_ARG=''
HAVE_GETHOSTBYNAME_R_5_ARG=''
HAVE_GETHOSTBYNAME_R_6_ARG=''
HGBRANCH=''
HGTAG=''
HGVERSION=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTSONAME=''
LDCXXSHARED=''
LDFLAGS=''
LDLAST=''
LDLIBRARY=''
LDLIBRARYDIR=''
LDSHARED=''
LIBC=''
LIBFFI_INCLUDEDIR=''
LIBM=''
LIBOBJS=''
LIBRARY=''
LIBS=''
LIBTOOL_CRUFT=''
LINKCC=''
LINKFORSHARED=''
LIPO_32BIT_FLAGS=''
LN=''
LTLIBOBJS=''
MACHDEP='linux2'
MACHDEP_OBJS=''
MAINCC=''
MKDIR_P=''
MULTIARCH=''
OBJEXT=''
OPT=''
OTHER_LIBTOOL_OPT=''
PACKAGE_BUGREPORT='http://bugs.python.org/'
PACKAGE_NAME='python'
PACKAGE_STRING='python 2.7'
PACKAGE_TARNAME='python'
PACKAGE_URL=''
PACKAGE_VERSION='2.7'
PATH_SEPARATOR=':'
PKG_CONFIG=''
PYTHONFRAMEWORK=''
PYTHONFRAMEWORKDIR='no-framework'
PYTHONFRAMEWORKIDENTIFIER='org.python.python'
PYTHONFRAMEWORKINSTALLDIR=''
PYTHONFRAMEWORKPREFIX=''
PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
RANLIB=''
RUNSHARED=''
SGI_ABI=''
SHELL='/bin/sh'
SHLIBS=''
SIGNAL_OBJS=''
SO=''
SOVERSION='1.0'
SRCDIRS=''
SVNVERSION=''
TCLTK_INCLUDES=''
TCLTK_LIBS=''
THREADHEADERS=''
THREADOBJ=''
TRUE=''
UNICODE_OBJS=''
UNIVERSALSDK=''
UNIVERSAL_ARCH_FLAGS=''
USE_SIGNAL_MODULE=''
USE_THREAD_MODULE=''
VERSION='2.7'
_PYTHON_HOST_PLATFORM=''
ac_ct_AR=''
ac_ct_CC='/opt/centos/devtoolset-1.1/root/usr/bin/gcc'
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* 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 600
#define _XOPEN_SOURCE_EXTENDED 1
#define _POSIX_C_SOURCE 200112L

configure: exit 77

最佳答案


C compiler cannot create executables

那是关于 gcc 丢失的文件。你将获得 # yum install gcc-c++

即gcc-c++ 的安装也会安装这个:{ libc-devel, glibc-headers, kernel-headers } ... to/usr/include/,/usr/lib64/。否则没有完全工作的 gcc。


附言: 系统 python 无法手动替换、更改或更新。所有管理工具 { yum, system-config-* } 将停止工作。

但是,您可以 1) 将新的 Python 安装到隐藏位置,例如/opt/python27/。

或者 2) 添加 SCL 存储库 https://wiki.centos.org/AdditionalResources/Repositories/SCL ...并获取/opt/rh/python27/:包列表在这里 http://mirror.centos.org/centos-6/6.8/sclo/x86_64/rh/python27/

关于python - 配置失败: C compiler cannot create executables(configure: exit 77)有什么问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37985352/

49 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com