安装iftop遇到的问题以及解决

安装步骤

首先需要安装必要的软件库

yum install  libpcap libpcap-devel ncurses ncurses-devel
yum install  flex byacc

安装命令

wget http://www.ex-parrot.com/pdw/iftop/download/iftop-0.17.tar.gz
tar zxvf iftop-0.17.tar.gz
cd iftop-0.17
./configure
make
make install

日志输出

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.54.  Invocation command line was

  $ ./configure 

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

hostname = data2.cdh.dc
uname -m = x86_64
uname -r = 3.10.0-693.el7.x86_64
uname -s = Linux
uname -v = #1 SMP Tue Aug 22 21:09:27 UTC 2017

/usr/bin/uname -p = x86_64
/bin/uname -X     = unknown

/bin/arch              = x86_64
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/java/jdk1.8.0_131/bin
PATH: /usr/lib64/qt-3.3/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /root/bin


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

configure:1296: checking build system type
configure:1314: result: x86_64-unknown-linux-gnu
configure:1322: checking host system type
configure:1336: result: x86_64-unknown-linux-gnu
configure:1344: checking target system type
configure:1358: result: x86_64-unknown-linux-gnu
configure:1392: checking for a BSD-compatible install
configure:1446: result: /usr/bin/install -c
configure:1457: checking whether build environment is sane
configure:1500: result: yes
configure:1533: checking for gawk
configure:1549: found /usr/bin/gawk
configure:1559: result: gawk
configure:1569: checking whether make sets ${MAKE}
configure:1589: result: yes
configure:1787: checking for gcc
configure:1803: found /usr/bin/gcc
configure:1813: result: gcc
configure:2055: checking for C compiler version
configure:2058: gcc --version &5
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
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:2061: $? = 0
configure:2063: 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-44) (GCC) 
configure:2066: $? = 0
configure:2068: gcc -V &5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2071: $? = 4
configure:2091: checking for C compiler default output
configure:2094: gcc    conftest.c  >&5
collect2: fatal error: cannot find 'ld'
compilation terminated.
configure:2097: $? = 1
configure: failed program was:
#line 2074 "configure"
#include "confdefs.h"

int
main ()
{

  ;
  return 0;
}
configure:2124: error: C compiler cannot create executables
check `config.log' for details.

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

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_build_alias=x86_64-unknown-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=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_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_host_alias=x86_64-unknown-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
ac_cv_target=x86_64-unknown-linux-gnu
ac_cv_target_alias=x86_64-unknown-linux-gnu

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

ACLOCAL='${SHELL} /usr/local/iftop/iftop-0.17/config/missing --run aclocal-1.6'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /usr/local/iftop/iftop-0.17/config/missing --run tar'
AUTOCONF='${SHELL} /usr/local/iftop/iftop-0.17/config/missing --run autoconf'
AUTOHEADER='${SHELL} /usr/local/iftop/iftop-0.17/config/missing --run autoheader'
AUTOMAKE='${SHELL} /usr/local/iftop/iftop-0.17/config/missing --run automake-1.6'
AWK='gawk'
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
DEFS=''
DEPDIR=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /usr/local/iftop/iftop-0.17/config/missing --run makeinfo'
OBJEXT=''
PACKAGE='iftop'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='0.17'
ac_aux_dir='config'
ac_ct_CC='gcc'
ac_ct_STRIP=''
am__include=''
am__quote=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${prefix}/share'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/usr/local/iftop/iftop-0.17/config/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='x86_64-unknown-linux-gnu'
target_alias=''
target_cpu='x86_64'
target_os='linux-gnu'
target_vendor='unknown'

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

#define IFTOP_VERSION "0.17"
#define PACKAGE "iftop"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define VERSION "0.17"

configure: exit 77

configure:2094: gcc conftest.c >&5
collect2: fatal error: cannot find ‘ld’

需要更新 binutils
命令为
sudo yum update binutils

你可能感兴趣的:(运维,服务器)