ubuntu环境搭建得错误处理

 lsb@ubuntu:~/gx/zhang_guiping_old/kernel/linux-2.6.22.6$ make menuconfig
  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c: In function ‘traps’:
scripts/basic/fixdep.c:377: warning: dereferencing type-punned pointer will break strict-aliasing rules
scripts/basic/fixdep.c:379: warning: dereferencing type-punned pointer will break strict-aliasing rules
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:399: fatal error: opening dependency file scripts/basic/.fixdep.d: Permission denied
compilation terminated.
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2

 

将会安装下列额外的软件包:
  g++ g++-4.0 libc6-dev libstdc++6-4.0-dev linux-kernel-headers
建议安装的软件包:
  gcc-4.0-doc lib64stdc++6 glibc-doc manpages-dev libstdc++6-4.0-doc stl-manual
下列【新】软件包将被安装:
  build-essential g++ g++-4.0 libc6-dev libstdc++6-4.0-dev linux-kernel-headers


检查一下以下这些包都装了没有
module-init-tools
libc6-dev
libncurses5-dev
modutils

libc6-dev

你编译的是什么版本的内核呢。
这个我倒没碰到过。你可以这样试试看。
sudo aptitude search linux-image
可以搜到许多内核版本
然后
sudo apt-get build-dep linux-image***(从上面搜索到的内核版本找一个和你要编译的内核版本相近的版本号)
看看提示要安装什么依赖的包,安装上再编译试试。
 

----------------


lsb@ubuntu:~/gx/zhang_guiping_old/kernel/linux-2.6.22.6$ make
  CHK     include/linux/version.h
/bin/sh: cannot create include/linux/version.h.tmp: Permission denied
-------------------

lsb@ubuntu:~/gx/zhang_guiping_old/kernel/linux-2.6.22.6$ sudo make
make: arm-linux-gnu-gcc: Command not found
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  CC      arch/arm/kernel/asm-offsets.s
/bin/sh: arm-linux-gnu-gcc: not found
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 127
make: *** [prepare0] Error 2
lsb@ubuntu:~/gx/zhang_guiping_old/kernel/linux-2.6.22.6$ make
  CHK     include/linux/version.h
/bin/sh: cannot create include/linux/version.h.tmp: Permission denied
make: *** [include/linux/version.h] Error 2

------------------------------

lsb@ubuntu:~/gx/zhang_guiping_old/kernel/linux-2.6.22.6$ sudo make
[sudo] password for lsb:
make: arm-linux-gnu-gcc: Command not found
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c: In function ‘traps’:
scripts/basic/fixdep.c:377: warning: dereferencing type-punned pointer will brea                      k strict-aliasing rules
scripts/basic/fixdep.c:379: warning: dereferencing type-punned pointer will brea                      k strict-aliasing rules
  HOSTCC  scripts/basic/docproc
  CC      arch/arm/kernel/asm-offsets.s
/bin/sh: arm-linux-gnu-gcc: not found
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 127
make: *** [prepare0] Error 2

-------------------

最后找出了:

在根目录下没有权限,哎!!悲哀!!

sudo chmod 777 kernel -R

搞定:

最值得注意的是:定目录的Makefile 是否该为相对应的交叉工具链

你可能感兴趣的:(function,ubuntu,command,basic,search,makefile)