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

执行到make步骤时,出错:

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

这时,就需要安装headers

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

linux安装iscsi target,make时出错,解决方法的更多相关文章

  1. 安装openstack同步数据库时出错解决方法

    错误提示:(2003, "Can't connect to MySQL server on 'controller' ([Errno -2] Name or service not know ...

  2. Linux安装ElasticSearch启动报错的解决方法

    Linux安装ElasticSearch后,ElasticSearch是不能用root用户启动的,以root用户启动会报错Refer to the log for complete error det ...

  3. 编译lua-5.3.5时出错解决方法

    问题描述: 执行 make linux test 过程出现错误,错误信息如下: “ lua.c:82:31: fatal error: readline/readline.h: No such fil ...

  4. Windows Server 2012启用Windows功能NetFx3时出错解决方法

    作者:冰点阳光 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明网址:http://baohua.me/operating-system/windows-server-2012- ...

  5. linux 安装软件各种错误集锦及解决方法

    1.最小化安装了centos, 但是使用ifconfig命令时候出现”bash ifconfig command not found” .解决方法:yum -y install net-tools.x ...

  6. linux安装Navicat,界面出现乱码解决方法

    下载Navicat:navicat112_mariadb_cs_x64.tar.gz 点击" ./start_navicat"安装出现界面便面为乱码 解决办法:打开start_na ...

  7. XManager远程Linux 安装Oracle 图形化界面xstart解决方法

    一.安装Oracle_11g_R21.安装所必要的软件包:(CentOS)参见官方文档-rw-r--r--. 1 oracle oinstall 1358454646 Feb  5 22:57 p10 ...

  8. kail linux安装软件提示“无法定位软件包”解决方法

    主要是更新源的问题,我安装ibus-pinyin老是提示"无法定位软件包" 最后我用的是163的源: # 源 deb http://mirrors.163.com/debian w ...

  9. SAE上使用本地sql文件建表时出错解决方法

    在SAE上部署网站时需要上传本地的数据库结构,我也导出了本地数据库为sql文件,但是上传到SAE上时遇到了如下错误: MySQL 返回: #1044 - Access denied for user ...

随机推荐

  1. Axure母版

    1.生成母版: 在左侧窗口的最下方有母版管理窗口,可以在该管理窗口中直接新建母版.也可以在某个页面中将某些部件转换为母版.如图: ----------------------------------- ...

  2. Oracle数据库——表的创建与管理

    一.涉及内容 1.掌握使用OEM工具创建.修改和删除表. 2.掌握使用SQL语句创建.修改和删除表. 3.掌握使用SQL语句插入.修改和删除数据. 4.理解各种约束的作用,并能够使用OEM工具和SQL ...

  3. linux概念之cpu分析

    http://ilinuxkernel.com/?cat=4 Linux CPU占用率原理与精确度分析1  CPU占用率计算原理在Linux/Unix 下,CPU 利用率分为用户态.系统态和空闲态,分 ...

  4. OpenJudge计算概论-循环移动

    /*=============================================================================== 循环移动 总时间限制: 1000ms ...

  5. The repository for high quality TypeScript type definitions

    Best practices This is a guide to the best practices to follow when creating typing files. There are ...

  6. 常用邮件 smtp pop

    常用的邮箱服务器(SMTP.POP3)地址.端口  sina.com: POP3服务器地址:pop3.sina.com.cn(端口:110) SMTP服务器地址:smtp.sina.com.cn(端口 ...

  7. 解决Win10默认占用80端口

    方案1: 以管理员身份运行cmd;输入net stop http;如果提示是否真的需要停止这些服务,则选择“Y”;完成后输入:sc config http start=disabled 方案2: Ct ...

  8. jQuery选择器大全(48个代码片段+21幅图演示)

    选择器是jQuery最基础的东西,本文中列举的选择器基本上囊括了所有的jQuery选择器,也许各位通过这篇文章能够加深对jQuery选择器 的理解,它们本身用法就非常简单,我更希望的是它能够提升个人编 ...

  9. java从零到变身爬虫大神(一)

    学习java3天有余,知道一些基本语法后 学习java爬虫,1天后开始出现明显效果 刚开始先从最简单的爬虫逻辑入手 爬虫最简单的解析面真的是这样 import org.jsoup.Jsoup; imp ...

  10. JAVA除法保留小数点后两位的两种方法 Java Math的 floor,round和ceil的总结

    floor 返回不大于的最大整数 round 则是4舍5入的计算,入的时候是到大于它的整数round方法,它表示“四舍五入”,算法为Math.floor(x+0.5),即将原来的数字加上0.5后再向下 ...