链接器输入文件未使用

链接器输入文件未使用

我正在尝试从源代码安装 wget 并收到以下错误:

make  all-recursive
make[1]: Entering directory '/linux1/tmp/wget-1.18'
Making all in lib
make[2]: Entering directory '/linux1/tmp/wget-1.18/lib'
  GEN      alloca.h
  GEN      c++defs.h
  GEN      warn-on-use.h
  GEN      arg-nonnull.h
  GEN      arpa/inet.h
  GEN      configmake.h
  GEN      fcntl.h
  GEN      langinfo.h
  GEN      locale.h
  GEN      netdb.h
  GEN      signal.h
  GEN      spawn.h
  GEN      stddef.h
  GEN      stdio.h
  GEN      stdlib.h
  GEN      string.h
  GEN      strings.h
  GEN      sys/file.h
  GEN      sys/ioctl.h
  GEN      sys/select.h
  GEN      sys/socket.h
  GEN      sys/stat.h
  GEN      sys/time.h
  GEN      sys/types.h
  GEN      sys/uio.h
  GEN      sys/wait.h
  GEN      time.h
  GEN      unistd.h
  GEN      unitypes.h
  GEN      uniwidth.h
  GEN      wchar.h
  GEN      wctype.h
make  all-recursive
make[3]: Entering directory '/linux1/tmp/wget-1.18/lib'
make[4]: Entering directory '/linux1/tmp/wget-1.18/lib'
  CC       base32.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       binary-io.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       c-ctype.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       c-strcasecmp.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       c-strncasecmp.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       c-strcasestr.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       cloexec.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       md5.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       sha1.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       sha256.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       dirname.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       basename.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       dirname-lgpl.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       basename-lgpl.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       stripslash.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       exitfail.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       fatal-signal.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       fd-hook.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       fd-safer-flag.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       dup-safer-flag.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       gettime.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       localcharset.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       glthread/lock.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       mbchar.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       mbiter.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       pipe2.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       pipe2-safer.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       quotearg.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       sig-handler.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       sockets.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       spawn-pipe.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       stat-time.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       strnlen1.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       sys_socket.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       tempname.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       glthread/threadlib.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       timespec.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       tmpdir.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       unistd.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       dup-safer.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       fd-safer.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       pipe-safer.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       uniwidth/width.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       utimens.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       wait-process.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       wctype-h.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       xmalloc.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       xalloc-die.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       xsize.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       xstrndup.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       asnprintf.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       fcntl.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       futimens.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       getpass.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       ioctl.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       mktime.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       printf-args.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       printf-parse.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       strerror_r.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       vasnprintf.o
gcc: warning: /linux1: linker input file unused because linking not done
  AR       libgnu.a
  GEN      charset.alias
  GEN      ref-add.sed
  GEN      ref-del.sed
make[4]: Leaving directory '/linux1/tmp/wget-1.18/lib'
make[3]: Leaving directory '/linux1/tmp/wget-1.18/lib'
make[2]: Leaving directory '/linux1/tmp/wget-1.18/lib'
Making all in src
make[2]: Entering directory '/linux1/tmp/wget-1.18/src'
make  all-am
make[3]: Entering directory '/linux1/tmp/wget-1.18/src'
  CC       connect.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       convert.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       cookies.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       ftp.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       css_.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       css-url.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       ftp-basic.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       ftp-ls.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       hash.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       host.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       hsts.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       html-parse.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       html-url.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       http.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       init.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       log.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       main.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       netrc.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       progress.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       ptimer.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       recur.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       res.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       retr.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       spider.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       url.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       warc.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       utils.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       exits.o
gcc: warning: /linux1: linker input file unused because linking not done
if test -n ""; then cp "./build_info.c.in" .; fi
/usr/bin/perl "../build-aux/build_info.pl" \
    "../src/build_info.c"
if test -n ""; then rm -f build_info.c.in; fi
  CC       build_info.o
gcc: warning: /linux1: linker input file unused because linking not done
echo '/* version.c */' > version.c
echo '/* Autogenerated by Makefile - DO NOT EDIT */' >> version.c
echo '' >> version.c
echo '#include "version.h"' >> version.c
echo 'const char *version_string = "1.18";' >> version.c
echo 'const char *compilation_string = "'gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\"/linux1/etc/wgetrc\" -DLOCALEDIR=\"/linux1/share/locale\" -I.  -I../lib -I../lib   /linux1 -DHAVE_LIBGNUTLS -I/linux1/include -DNDEBUG '";' \
    | sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$/";/' >> version.c
echo 'const char *link_string = "'gcc  /linux1 -DHAVE_LIBGNUTLS -I/linux1/include -DNDEBUG  \
  /linux1 -L/linux1/lib -lz   ftp-opie.o gnutls.o ../lib/libgnu.a'";' \
    | sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$/";/' >> version.c
  CC       version.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       ftp-opie.o
gcc: warning: /linux1: linker input file unused because linking not done
  CC       gnutls.o
gcc: warning: /linux1: linker input file unused because linking not done
  CCLD     wget
/usr/bin/ld: cannot find /linux1: File format not recognized
/usr/bin/ld: cannot find /linux1: File format not recognized
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1501: wget] Error 1
make[3]: Leaving directory '/linux1/tmp/wget-1.18/src'
make[2]: *** [Makefile:1400: all] Error 2
make[2]: Leaving directory '/linux1/tmp/wget-1.18/src'
make[1]: *** [Makefile:1408: all-recursive] Error 1
make[1]: Leaving directory '/linux1/tmp/wget-1.18'
make: *** [Makefile:1364: all] Error 2

任何有关如何进行的帮助都将不胜感激!谢谢。

在 Windows 10 的虚拟机上使用 Ubuntu 14.04.05 并尝试从源代码安装 Wget-1.18。我在自己的linux1/tmp/目录中从源代码安装了 gnutls-3.5.9

答案1

您需要安装 libgnutls-dev

sudo apt-get install libgnutls-dev

重点关注 DEV 部分:)

相关内容