我正在尝试在Mac上安装最新的glpk软件包。我将目录更改为存储gulp文件的文件夹,然后键入:
./configure --prefix=/usr/local
导致以下结果:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/johnstelmack/2017-1/OR/glpk-4.61':
configure: error: C compiler cannot create executables
See `config.log' for more details
如何安装此功能?我试过在./configure行前添加sudo而没有运气。
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 GLPK configure 4.61, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/usr/local
## --------- ##
## Platform. ##
## --------- ##
hostname = Johns-MacBook-Pro-2.local
uname -m = x86_64
uname -r = 16.6.0
uname -s = Darwin
uname -v = Darwin Kernel Version 16.6.0: Mon Apr 17 17:15:27 PDT 2017; root:xnu-3789.60.24~21/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 16.6.0: Mon Apr 17 17:15:27 PDT 2017; root:xnu-3789.60.24~21/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 8.00 gigabytes
Default processor set: 305 tasks, 1333 threads, 8 processors
Load average: 1.42, Mach factor: 6.56
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Library/Frameworks/Python.framework/Versions/3.6/bin
PATH: /Users/johnstelmack/anaconda/bin
PATH: /Library/Frameworks/Python.framework/Versions/3.5/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2259: checking for a BSD-compatible install
configure:2327: result: /usr/bin/install -c
configure:2338: checking whether build environment is sane
configure:2393: result: yes
configure:2544: checking for a thread-safe mkdir -p
configure:2583: result: ./install-sh -c -d
configure:2590: checking for gawk
configure:2620: result: no
configure:2590: checking for mawk
configure:2620: result: no
configure:2590: checking for nawk
configure:2620: result: no
configure:2590: checking for awk
configure:2606: found /usr/bin/awk
configure:2617: result: awk
configure:2628: checking whether make sets $(MAKE)
configure:2654: result: no
configure:2848: checking for gcc
configure:2864: found /usr/bin/gcc
configure:2875: result: gcc
configure:3104: checking for C compiler version
configure:3113: gcc --version >&5
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
configure:3124: $? = 1
configure:3113: gcc -v >&5
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
configure:3124: $? = 1
configure:3113: gcc -V >&5
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
configure:3124: $? = 1
configure:3113: gcc -qversion >&5
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
configure:3124: $? = 1
configure:3144: checking whether the C compiler works
configure:3166: gcc conftest.c >&5
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
configure:3170: $? = 1
configure:3208: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GLPK"
| #define PACKAGE_TARNAME "glpk"
| #define PACKAGE_VERSION "4.61"
| #define PACKAGE_STRING "GLPK 4.61"
| #define PACKAGE_BUGREPORT "bug-glpk@gnu.org"
| #define PACKAGE_URL ""
| #define PACKAGE "glpk"
| #define VERSION "4.61"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3213: error: in `/Users/johnstelmack/2017-1/OR/glpk-4.61':
configure:3215: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_CC_set=
ac_cv_env_CC_value=
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=
ac_cv_env_CPP_value=
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_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=awk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=no
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /Users/johnstelmack/2017-1/OR/glpk-4.61/missing --run aclocal-1.12'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AR=''
AUTOCONF='${SHELL} /Users/johnstelmack/2017-1/OR/glpk-4.61/missing --run autoconf'
AUTOHEADER='${SHELL} /Users/johnstelmack/2017-1/OR/glpk-4.61/missing --run autoheader'
AUTOMAKE='${SHELL} /Users/johnstelmack/2017-1/OR/glpk-4.61/missing --run automake-1.12'
AWK='awk'
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /Users/johnstelmack/2017-1/OR/glpk-4.61/missing --run makeinfo'
MANIFEST_TOOL=''
MKDIR_P='./install-sh -c -d'
NM=''
NMEDIT=''
NOUNDEFINED=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='glpk'
PACKAGE_BUGREPORT='bug-glpk@gnu.org'
PACKAGE_NAME='GLPK'
PACKAGE_STRING='GLPK 4.61'
PACKAGE_TARNAME='glpk'
PACKAGE_URL=''
PACKAGE_VERSION='4.61'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE='MAKE=make'
SHELL='/bin/sh'
STRIP=''
VERSION='4.61'
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /Users/johnstelmack/2017-1/OR/glpk-4.61/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local'
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 PACKAGE_NAME "GLPK"
#define PACKAGE_TARNAME "glpk"
#define PACKAGE_VERSION "4.61"
#define PACKAGE_STRING "GLPK 4.61"
#define PACKAGE_BUGREPORT "bug-glpk@gnu.org"
#define PACKAGE_URL ""
#define PACKAGE "glpk"
#define VERSION "4.61"
configure: exit 77