• linux安装iscsi target,make时出错,解决方法


    安装主要是按照这个网址的步骤来的:http://ixdba.blog.51cto.com/2895551/526452

    执行到make步骤时,出错:

    root@host:~/iscsitarget-1.4.20.2# make
    cc: error: /lib/modules/3.5.0-23-generic/build/include/linux/version.h: No such file or directory
    cc: fatal error: no input files
    compilation terminated.
    /bin/sh: 1: [: -le: unexpected operator
    /bin/sh: 1: [: -le: unexpected operator
    /bin/sh: 1: [: -le: unexpected operator
    /bin/sh: 1: [: -le: unexpected operator
    /bin/sh: 1: [: -le: unexpected operator
    /bin/sh: 1: [: -le: unexpected operator
    /bin/sh: 1: [: -le: unexpected operator
    /bin/sh: 1: [: -le: unexpected operator
    /bin/sh: 1: [: -le: unexpected operator
    /bin/sh: 1: [: -le: unexpected operator
    /bin/sh: 1: [: -le: unexpected operator
    /bin/sh: 1: [: -lt: unexpected operator
    make -C usr
    make[1]: Entering directory `/root/iscsitarget-1.4.20.2/usr'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/root/iscsitarget-1.4.20.2/usr'
    make -C /lib/modules/3.5.0-23-generic/build SUBDIRS=/root/iscsitarget-1.4.20.2/kernel modules
    make: *** /lib/modules/3.5.0-23-generic/build: No such file or directory.  Stop.
    make: *** [kernel] Error 2
    root@controller:~/iscsitarget-1.4.20.2# cd /lib/modules/3.5.0-23-generic/build/include/linux
    -bash: cd: /lib/modules/3.5.0-23-generic/build/include/linux: No such file or directory
    root@controller:~/iscsitarget-1.4.20.2# cd /lib/modules/3.5.0-23-generic/build/include/
    -bash: cd: /lib/modules/3.5.0-23-generic/build/include/: No such file or directory
    root@controller:~/iscsitarget-1.4.20.2# cd /lib/modules/3.5.0-23-generic/build/
    -bash: cd: /lib/modules/3.5.0-23-generic/build/: No such file or directory

    找不到/lib/modules/3.5.0-23-generic/build/include/linux/version.h

    可以执行以下命令查看系统是否安装了kernel headers

    ls /lib/modules/`uname -r`/build/include/linux/version.h

    如果得到关于额米有这个文件的信息,比如:

    ls: /lib/modules/2.6.15-23-386/build/include/linux/version.h: No such file or directory

    这时,就需要安装headers

    apt-get install linux-headers-`uname -r`
  • 相关阅读:
    【后缀数组】poj2406 Power Strings
    [HNOI 2013]游走
    [HAOI 2008]木棍分割
    [SCOI 2010]传送带
    [SDOI 2010]魔法猪学院
    [Codeforces 235B]Let's Play Osu!
    [SPOJ 10628]Count on a tree
    [ZJOI 2010]count 数字计数
    [SHOI 2008]Debt 循环的债务
    [JSOI 2008]星球大战starwar
  • 原文地址:https://www.cnblogs.com/xiaoerlang/p/3584336.html
Copyright © 2020-2023  润新知