1:确保安装jdk,如果没有安装请移布:http://www.cnblogs.com/jiuyueguang/p/3156621.html
2:如果已经安装了jdk,还是提示此错误,
解决方法
请确保你的jdk在/usr/lib/jvm下
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_30/bin/java 300
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1..0_30/bin/javac
sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jdk1..0_30/bin/javah
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1..0_30/bin/jar
3:重新编译内核