在ubuntu上自动安装源码树的时候,发现使用如下的命令,没有得到我期望的内核源码的版本。
$ sudo apt-get install linux-source
我的系统版本应该是linux-headers-3.19.0-25,下载下来的源码是linux-source-3.12.0的。
卸载掉下载的源码:
$ sudo apt-get autoremove linux-source-3.12.0
安装网上的说法重新安装匹配的内核版本。
$ sudo apt-get install dpkg-dev<pre name="code" class="cpp">$ apt-get source linux-image-$(uname -r)
可以得到如下结果。