我做错了什么?
我在日志中看到的第一个错误是:gcc:错误:无法识别的命令行选项“-V”
我曾尝试遵循谷歌的一些建议 - 但没有任何帮助......
我已经安装了:
- gcc-4.8.4-arm-1
- gcc-solibs-4.8.4-arm-1
- automake-1.15-arm-1
- 制作-3.81-arm-1
- autoconf-2.68-arm-01
- libconfig-1.4.9-arm-1
- mpfr-3.1.0-arm-1
- binutils-2.23.1-arm-1
输出:
root@NAS:/i-data/md0/admin/sshpass-1.06# ./configure
checking for a BSD-compatible install... /ffp/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /ffp/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/i-data/md0/admin/sshpass-1.06':
configure: error: C compiler cannot create executables
See 'config.log' for more details
该文件包含运行 configure 时编译器产生的任何消息,以便在 configure 出现错误时帮助调试。
它是由 sshpass configure 1.06 创建的,而 sshpass configure 1.06 是由 GNU Autoconf 2.69 生成的。调用命令行是
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = NAS
uname -m = armv5tel
uname -r = 2.6.31.8
uname -s = Linux
uname -v = #2 Fri Mar 11 17:35:20 CST 2016
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /ffp/sbin
PATH: /usr/sbin
PATH: /sbin
PATH: /ffp/bin
PATH: /usr/bin
PATH: /bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2254: checking for a BSD-compatible install
configure:2322: result: /ffp/bin/install -c
configure:2333: checking whether build environment is sane
configure:2388: result: yes
configure:2539: checking for a thread-safe mkdir -p
configure:2578: result: /ffp/bin/mkdir -p
configure:2585: checking for gawk
configure:2601: found /ffp/bin/gawk
configure:2612: result: gawk
configure:2623: checking whether make sets $(MAKE)
configure:2645: result: yes
configure:2674: checking whether make supports nested variables
configure:2691: result: yes
configure:2832: checking for style of include used by make
configure:2860: result: GNU
configure:2931: checking for gcc
configure:2947: found /ffp/bin/gcc
configure:2958: result: gcc
configure:3187: checking for C compiler version
configure:3196: gcc --version >&5
gcc (GCC) 4.8.4
Copyright (C) 2013 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:3207: $? = 0
configure:3196: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/zy-pkgs/ffproot/ffp/bin/../libexec/gcc/arm-ffp-linux-uclibcgnueabi/4.8.4/lto-wrapper
Target: arm-ffp-linux-uclibcgnueabi
Configured with: ../gcc-4.8.4/configure --prefix=/ffp --with-local-prefix=/ffp --build=arm-ffp-linux-uclibcgnueabi --host=arm-ffp-linux-uclibcgnueabi --disable-nls --enable-shared --enable-languages=c,c++ --enable-__cxa_atexit --enable-c99 --enable-long-long --enable-threads=posix --disable-multilib --with-system-zlib --enable-checking=release --with-float=soft --with-native-system-header-dir=/ffp/include
Thread model: posix
gcc version 4.8.4 (GCC)
configure:3207: $? = 0
configure:3196: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3207: $? = 1
configure:3196: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3207: $? = 1
configure:3227: checking whether the C compiler works
configure:3249: gcc conftest.c >&5
/ffp/bin/ld: cannot find crt1.o: No such file or directory
/ffp/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:3253: $? = 1
configure:3291: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "sshpass"
| #define PACKAGE_TARNAME "sshpass"
| #define PACKAGE_VERSION "1.06"
| #define PACKAGE_STRING "sshpass 1.06"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "sshpass"
| #define VERSION "1.06"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3296: error: in `/i-data/md0/admin/sshpass-1.06':
configure:3298: 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='/ffp/bin/install -c'
ac_cv_path_mkdir=/ffp/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /i-data/md0/admin/sshpass-1.06/missing aclocal-1.15'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
AUTOCONF='${SHELL} /i-data/md0/admin/sshpass-1.06/missing autoconf'
AUTOHEADER='${SHELL} /i-data/md0/admin/sshpass-1.06/missing autoheader'
AUTOMAKE='${SHELL} /i-data/md0/admin/sshpass-1.06/missing automake-1.15'
AWK='gawk'
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /i-data/md0/admin/sshpass-1.06/missing makeinfo'
MKDIR_P='/ffp/bin/mkdir -p'
OBJEXT=''
PACKAGE='sshpass'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='sshpass'
PACKAGE_STRING='sshpass 1.06'
PACKAGE_TARNAME='sshpass'
PACKAGE_URL=''
PACKAGE_VERSION='1.06'
PATH_SEPARATOR=':'
SET_MAKE=''
SHELL='/ffp/bin/sh'
STRIP=''
VERSION='1.06'
ac_ct_CC='gcc'
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__nodep='_no'
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /i-data/md0/admin/sshpass-1.06/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='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "sshpass"
#define PACKAGE_TARNAME "sshpass"
#define PACKAGE_VERSION "1.06"
#define PACKAGE_STRING "sshpass 1.06"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "sshpass"
#define VERSION "1.06"
configure: exit 77
答案1
问题的关键是没有安装 C++ 编译器。
在 Debian/Ubnutu 系统上,安装一个很简单:
sudo apt install gobjc++
答案2
我在设置 React Native 项目时看到了这一点。 这里对我有用。
sudo xcode-select --switch /Applications/Xcode.app
答案3
我遇到了类似的问题。
我通过在终端中输入以下命令解决了这个问题:
sudo apt-get install --reinstall build-essential
sudo apt-get install --reinstall gcc
sudo dpkg-重新配置构建基本
sudo dpkg-重新配置 gcc
之后我就没问题了。