linux如何编译安装???

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux如何编译安装???相关的知识,希望对你有一定的参考价值。

我的HP笔记本装的是ubuntu9.04,没有声音,想重新安装ALSA看看,已经下载了alsa-driver-1.0.23.tar.bz2、alsa-lib-1.0.23.tar.bz2、和alsa-utils-1.0.23.tar.bz2 三个文件,不过我不会编译安装网上看的教程是  先./configure   再make可是我的怎么不行啊,下面是我终端的信息!lsq@lsq-laptop:~/alsa-driver-1.0.23$ ./configurechecking for gcc... gccchecking for C compiler default output file name... a.outchecking whether the C compiler works... yeschecking whether we are cross compiling... nochecking for suffix of executables... checking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for ranlib... ranlibchecking for a BSD-compatible install... /usr/bin/install -cchecking how to run the C preprocessor... gcc -Echecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for ANSI C header files... yeschecking for an ANSI C-conforming const... yeschecking for inline... inlinechecking whether time.h and sys/time.h may both be included... yeschecking whether gcc needs -traditional... nochecking for current directory... /home/lsq/alsa-driver-1.0.23checking cross compile... checking for directory with ALSA kernel sources... ../alsa-kmirrorchecking for directory with kernel source... Please install the package with full kernel sources for your distributionor use --with-kernel=dir option to specify another directory with kernelsources (default is /usr/src/linux).lsq@lsq-laptop:~/alsa-driver-1.0.23$ makemake all-depsmake[1]: 正在进入目录 `/home/lsq/alsa-driver-1.0.23'make[1]: 没有什么可以做的为 `all-deps'。make[1]:正在离开目录 `/home/lsq/alsa-driver-1.0.23'Please, run the configure script as first...lsq@lsq-laptop:~/alsa-driver-1.0.23$  这到底是什么问题?是少安装了什么软件 还是什么原因?本人菜鸟,麻烦说清楚点,谢谢了!高手赶紧冒个泡!!!

参考技术A Please install the package with full kernel sources for your distributionor use --with-kernel=dir option to specify another directory with kernelsources (default is /usr/src/linux)

很明显,你没有安装kernel源代码包。apt-get source linux-image-$(uname -r)
参考技术B 首先得将软件包解压
然后,进入解压的目录 再配置 就是你说./configure
再 make
最后install

以上是关于linux如何编译安装???的主要内容,如果未能解决你的问题,请参考以下文章

如何在linux中安装gcc编译器?

Linux中如何从源代码编译安装程序

如何查看linux已安装的编译器及其版本

安装linux时如何安装GCC

如何编译安装PHP扩展

如何使Linux在交叉编译工具安装配置并立即生效