/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
#include_next <limits.h> /* recurse down to the real one */
^
compilation terminated.
error: command 'gcc' failed with exit status 1linux
問題解決過程:ubuntu
1)提示找不到linux/limits.h,即/usr/include/linux/路徑下沒有limits.h這個文件,想到多是少了某個包,接下來的任務就是找到生成這個路徑下limits.h文件的包;ionic
2)兩個須要掌握的命令:dpkg -l 打印出系統中安裝的全部包; dpkg -L 包名 打印出該包生成的全部文件及其路徑。spa
3)考慮到通常的頭文件都是由 「XXX-dev」 這樣名字的包生成的。因而首先用命令dpkg -l |grep "dev" 標出那些候選,就幾個;rest
4)而後將候選的幾個包,用dpkg -L 包名 | grep "linux/limits.h" 打印結果,有結果的即爲正確的包。最後定位到包 「linux-libc-dev:amd64」 ;code
5)覺得沒有這個包,因而直接安裝 apt-get install linux-libc-dev:amd64。但發現並無更新任何軟件包。意思是安裝了這個包,可是卻沒有在/usr/include/linux/路徑下生成應該生成的limits.h文件。因而考慮將linux-libc-dev:amd64卸載後再從新安裝。注意在卸載linux-libc-dev:amd64的時候還會卸載相關的幾個包(大概7個左右,具體忘記了)。等卸載完成後,apt-get install linux-libc-dev:amd64,安裝包,以後再將以前卸載的那幾個相關的包一一安裝上;blog
6)都安裝好後再 make menuconfig,成功!!!大功告成啦。。。。。。。get
若是上述方法不行,it
嘗試先更新一下源,io
而後安裝
apt-get install gcc-multilib
備份/etc/apt/sources.list #備份 cp /etc/apt/sources.list /etc/apt/sources.list.bak 在/etc/apt/sources.list文件前面添加以下條目 #添加阿里源 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse 最後執行以下命令更新源 ##更新 sudo apt-get update sudo apt-get upgrade