首页 > 其他 > 详细

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

时间:2014-03-06 19:03:36      阅读:671      评论:0      收藏:0      [点我收藏+]

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

执行到make步骤时,出错:

bubuko.com,布布扣
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/usrmake[1]: Nothing to be done for `all.
make[1]: Leaving directory `/root/iscsitarget-1.4.20.2/usrmake -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
bubuko.com,布布扣

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

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

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

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

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

这时,就需要安装headers

apt-get install linux-headers-`uname -r`

linux安装iscsi target,make时出错,解决方法,布布扣,bubuko.com

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

原文:http://www.cnblogs.com/xiaoerlang/p/3584336.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!