如何在Kali Linux上从源代码构建MFOC?

如何在Kali Linux上从源代码构建MFOC?,linux,path,configure,Linux,Path,Configure,我必须进行配置和制作,但当我运行/configure时,它会显示: # ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking

我必须进行配置和制作,但当我运行
/configure
时,它会显示:

# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
#Here the error
./configure: line 3930: syntax error near unexpected token `libnfc,'
./configure: line 3930: `PKG_CHECK_MODULES(libnfc, libnfc >= $LIBNFC_REQUIRED_VERSION, , AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.]))'
我已经考虑了错误的3个可能原因:

  • 发生此错误是因为请求的路径或名称之间存在差异
  • 事实上,synaptic说我的Kali Linux中的libnfc是:

    library: libnfc5, 1.7.1-b4
    binaries: libnfc-bin, 1.7.1-b4
    
    所以,问题可能是5个领先的libnfc

  • 预期的路径不同

  • 不支持Libnfc 1.7.1,因为上一次更新(的第16行)是针对1.7.0的

  • 你能帮我吗


    我报告了配置的帮助,也许它很有趣

    # ./configure -help
    `configure' configures mfoc 0.10.7 to adapt to many kinds of systems.
    
    Usage: ./configure [OPTION]... [VAR=VALUE]...
    
    To assign environment variables (e.g., CC, CFLAGS...), specify them as
    VAR=VALUE.  See below for descriptions of some of the useful variables.
    
    Defaults for the options are specified in brackets.
    
    Configuration:
      -h, --help              display this help and exit
          --help=short        display options specific to this package
          --help=recursive    display the short help of all the included packages
      -V, --version           display version information and exit
      -q, --quiet, --silent   do not print `checking ...' messages
          --cache-file=FILE   cache test results in FILE [disabled]
      -C, --config-cache      alias for `--cache-file=config.cache'
      -n, --no-create         do not create output files
          --srcdir=DIR        find the sources in DIR [configure dir or `..']
    
    Installation directories:
      --prefix=PREFIX         install architecture-independent files in PREFIX
                              [/usr/local]
      --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                              [PREFIX]
    
    By default, `make install' will install all the files in
    `/usr/local/bin', `/usr/local/lib' etc.  You can specify
    an installation prefix other than `/usr/local' using `--prefix',
    for instance `--prefix=$HOME'.
    
    For better control, use the options below.
    
    Fine tuning of the installation directories:
      --bindir=DIR            user executables [EPREFIX/bin]
      --sbindir=DIR           system admin executables [EPREFIX/sbin]
      --libexecdir=DIR        program executables [EPREFIX/libexec]
      --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
      --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
      --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
      --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
      --libdir=DIR            object code libraries [EPREFIX/lib]
      --includedir=DIR        C header files [PREFIX/include]
      --oldincludedir=DIR     C header files for non-gcc [/usr/include]
      --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
      --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
      --infodir=DIR           info documentation [DATAROOTDIR/info]
      --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
      --mandir=DIR            man documentation [DATAROOTDIR/man]
      --docdir=DIR            documentation root [DATAROOTDIR/doc/mfoc]
      --htmldir=DIR           html documentation [DOCDIR]
      --dvidir=DIR            dvi documentation [DOCDIR]
      --pdfdir=DIR            pdf documentation [DOCDIR]
      --psdir=DIR             ps documentation [DOCDIR]
    
    Program names:
      --program-prefix=PREFIX            prepend PREFIX to installed program names
      --program-suffix=SUFFIX            append SUFFIX to installed program names
      --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
    
    Optional Features:
      --disable-option-checking  ignore unrecognized --enable/--with options
      --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
      --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
      --enable-silent-rules   less verbose build output (undo: "make V=1")
      --disable-silent-rules  verbose build output (undo: "make V=0")
      --enable-dependency-tracking
                              do not reject slow dependency extractors
      --disable-dependency-tracking
                              speeds up one-time build
    
    Some influential environment variables:
      CC          C compiler command
      CFLAGS      C compiler flags
      LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
                  nonstandard directory <lib dir>
      LIBS        libraries to pass to the linker, e.g. -l<library>
      CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
                  you have headers in a nonstandard directory <include dir>
      CPP         C preprocessor
    
    Use these variables to override the choices made by `configure' or to help
    it to find libraries and programs with nonstandard names/locations.
    
    #/配置-帮助
    `“配置”配置mfoc 0.10.7以适应多种系统。
    用法:./configure[选项]。。。[VAR=VALUE]。。。
    要分配环境变量(如CC、CFLAGS…),请将其指定为
    VAR=值。有关一些有用变量的说明,请参见下文。
    括号中指定了选项的默认值。
    配置:
    -h、 --帮助显示此帮助并退出
    --help=特定于此软件包的简短显示选项
    --help=递归显示所有包含包的简短帮助
    -五、 --版本显示版本信息并退出
    -q、 --安静,--安静不打印“检查…”消息
    --缓存文件=文件中的文件缓存测试结果[已禁用]
    -C、 “--cache file=config.cache”的配置缓存别名
    -n、 --不创建不创建输出文件
    --srcdir=DIR在DIR[configure DIR或`..']中查找源
    安装目录:
    --prefix=prefix在prefix中安装与体系结构无关的文件
    [/usr/local]
    --exec prefix=EPREFIX在EPREFIX中安装与体系结构相关的文件
    [前缀]
    默认情况下,“make install”将安装中的所有文件
    `/usr/local/bin'、`/usr/local/lib'等。您可以指定
    除使用“---prefix”的“/usr/local”之外的安装前缀,
    例如“--prefix=$HOME”。
    为了更好地控制,请使用以下选项。
    安装目录的微调:
    --bindir=DIR用户可执行文件[EPREFIX/bin]
    --sbindir=DIR系统管理可执行文件[EPREFIX/sbin]
    --libexecdir=DIR程序可执行文件[EPREFIX/libexec]
    --sysconfdir=DIR只读单机数据[前缀/etc]
    --sharedstatedir=DIR可修改体系结构独立数据[PREFIX/com]
    --localstatedir=DIR可修改的单机数据[前缀/var]
    --runstatedir=每个进程数据可修改的目录[LOCALSTATEDIR/run]
    --libdir=DIR对象代码库[EPREFIX/lib]
    --includedir=DIR C头文件[前缀/包含]
    --oldincludedir=DIR非gcc的C头文件[/usr/include]
    --datarootdir=DIR只读arch.-独立数据根[前缀/共享]
    --datadir=DIR只读架构独立数据[DATAROOTDIR]
    --infodir=DIR信息文档[DATAROOTDIR/info]
    --localedir=DIR依赖于区域设置的数据[DATAROOTDIR/locale]
    --mandir=DIR-man文档[DATAROOTDIR/man]
    --docdir=DIR文档根目录[DATAROOTDIR/doc/mfoc]
    --htmldir=DIR html文档[DOCDIR]
    --dvidir=DIR dvi文档[DOCDIR]
    --pdfdir=DIR pdf文档[DOCDIR]
    --psdir=DIR ps文档[DOCDIR]
    程序名称:
    --program prefix=为已安装的程序名添加前缀前缀
    --程序后缀=后缀将后缀附加到已安装的程序名
    --程序转换名称=程序在已安装的程序名称上运行sed程序
    可选功能:
    --禁用选项检查忽略无法识别的--enable/--with options
    --禁用功能不包括功能(与--enable FEATURE=no相同)
    --启用功能[=ARG]包括功能[ARG=yes]
    --启用无提示规则,减少详细的生成输出(撤消:“使V=1”)
    --禁用静默规则详细生成输出(撤消:“使V=0”)
    --启用依赖项跟踪
    不要拒绝慢速依赖项提取器
    --禁用依赖项跟踪
    加速一次性构建
    一些有影响的环境变量:
    CC编译器命令
    CFLAGS C编译器标志
    LDFLAGS链接器标志,例如,-L,如果在
    非标准目录
    要传递给链接器的LIBS库,例如-l
    CPPFLAGS(目标)C/C++预处理器标志,例如-I if
    在非标准目录中有标题
    cppc预处理器
    使用这些变量覆盖“配置”所做的选择或帮助
    查找具有非标准名称/位置的库和程序非常困难。
    
    错误消息并不意味着系统上的
    libnfc
    有问题shell脚本
    configure

    configure
    脚本未对
    libnfc
    执行检查。错误消息是关于shell脚本中的一个语法错误,该错误位于用于执行此检查的行中

    ./configure: line 3930: syntax error near unexpected token `libnfc,'
    ./configure: line 3930: `PKG_CHECK_MODULES(libnfc, libnfc >= $LIBNFC_REQUIRED_VERSION, , AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.]))'
    
    这与您在pastebin上显示的脚本中的行号不完全匹配。 这里的错误在第3963行

    从第3949行开始的脚本片段

    ...
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
    $as_echo "$am_cv_make_support_nested_variables" >&6; }
    if test $am_cv_make_support_nested_variables = yes; then
       AM_V='$(V)'
     AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
    else
     AM_V=$AM_DEFAULT_VERBOSITY
     AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
    fi
    AM_BACKSLASH='\'
    
    
    # Checks for pkg-config modules.
    LIBNFC_REQUIRED_VERSION=1.7.0
    PKG_CHECK_MODULES(libnfc, libnfc >= $LIBNFC_REQUIRED_VERSION, , AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.]))
    
    PKG_CONFIG_REQUIRES="libnfc"
    
    
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
    $as_echo_n "checking for inline... " >&6; }
    if ${ac_cv_c_inline+:} false; then :
     $as_echo_n "(cached) " >&6
    else
     ac_cv_c_inline=no
    for ac_kw in inline __inline__ __inline; do
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    /* end confdefs.h.  */
    ...
    
    。。。
    {$as_echo“$as_me:${as_lineno-$lineno}:结果:$am_cv_make_support_nested_variables”>&5
    $as_echo“$am_cv_make_support_nested_variables”>&6;}
    如果test$am\u cv\u make\u support\u nested\u variables=yes;然后
    AM_V='$(V)'
    AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
    其他的
    AM_V=$AM_默认值\u详细程度
    AM_DEFAULT_V=$AM_DEFAULT_详细信息
    fi
    AM\u反斜杠='\'
    #检查pkg配置模块。
    LIBNFC_必需_版本=1.7.0
    打包检查模块(libnfc,libnfc>=$libnfc\u必需版本,AC\u MSG\u错误([libnfc>=$libnfc\u必需版本是必需的。])
    PKG_CONFIG_REQUIRES=“libnfc”
    {$as_echo“$as_me:${as_lineno-$lineno}:检查内联”>&5
    $as_ech