安装主要是按照这个网址的步骤来的: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. jquery mouseout事件错误(bug)

    移到子元素上时(例如,处在div中的图像),触发移出事件 (mouseout事件的一个常见错误). 解决办法是使用hover事件 在使用hover事件前,我抓耳挠腮的以为是margin或padding ...

  2. Unity3D研究院编辑器之不影响原有布局拓展Inspector

    今天无意间发现了一篇好文章,也让我解决了一个很久都没解决的难题.问题是这样的,假如我想去拓展Unity自带的inspector但是并不想影响原有布局. 比如下面这段代码:     1 2 3 4 5 ...

  3. Openjudge计算概论-求序列中的众数

    /*===================================== 求序列中的众数 总时间限制: 1000ms 内存限制: 65536kB 描述 输入一个长度为N的整数序列 (不多于128 ...

  4. Cobertura 代码覆盖率测试

    Cobertura 是一种开源工具,它通过检测基本的代码,并观察在测试包运行时执行了哪些代码和没有执行哪些代码,来测量测试覆盖率.除了找出未测试到的代码并发现 bug 外,Cobertura 还可以通 ...

  5. replace() replace_copy()

    int a[] = {1,2,3,3,4}; vector<int> v(a, a+5); vector<int> v2; //replace(v.begin(), v.end ...

  6. VS 2010 编译安装 boost 库 -(和 jsoncpp 库共存)

    boost库的简单应用很容易,网上有很多资料,但是,如果要json 和 boost 一起使用就会出现这样那样的问题, 有时候提示找不到 “libboost_coroutine-vc100-mt-sgd ...

  7. 墨刀 手机app原型工具

    https://modao.io 并且墨刀对开放项目永久免费!

  8. C#的浅拷贝和深拷贝

    C#中有两种类型变量,一种 是值类型变量,一种是引用类型变量 对于值类型变量,深拷贝和前拷贝都是通过赋值操作符号(=)实现,其效果一致,将对象中的值类型的字段拷贝到新的对象中.这个很容易理解. 本文重 ...

  9. Zabbix的安装与部署---问题处理(php65.6.28 mysqli 报错误 处理)

    1)php65.6.28  mysqli  报错误 处理 http://www.xiaochengfu.com/index.php/index/detail/aid/92.html 2)linux下p ...

  10. 微信浏览器里location.reload问题

    微信浏览器里location.reload问题会导致有时候post数据丢失.建议不要用此方式,尽量ajax方式获取或不要为了获取新的UI而刷新页面 2015-12-26 00:51:34array ( ...