apt-get build-dep命令详解

apt-get build-dep命令详解 - 星星之火的Blog - CSDN博客  https://blog.csdn.net/starflame/article/details/7416311javascript

今天看到一位网友的签名档写着:“用 Debian 的感受就象家里开超市同样无论要什么只需一个 apt-get”。实在太贴切了,我也以为有这种感受~java

 今天在ubuntu中文上看到 apt-get 里面有个 build-dep参数,上网查了很久都没有找到答案,手册英文写着:linux

build-dep causes apt-get to install/remove packages in an attempt to satisfy the build dependencies for a source package.
通过理解得出:
build-dep参数是指创建某个要编译软件的环境,能够这样理解:好比咱们如今要手工编译apache,那若是想让编译正常经过,你能够事先把编译过程当中须要用到的软件包先配置好。
如:c++

howlym@ubuntu:~$ sudo apt-get build-dep apache2
正在读取软件包列表… 完成
正在分析软件包的依赖关系树… 完成
下列【新】软件包将被安装:
autoconf autotools-dev libdb4.2-dev libexpat1-dev libldap2-dev libpcre3-dev
libssl-dev libtool m4 zlib1g-dev
共升级了 0 个软件包,新安装了 10 个软件包,要卸载 0 个软件包,有 0 个软件未被升 级。
须要下载 4869kB/4979kB 的软件包。
解压缩后会消耗掉 15.1MB 的额外空间。
您但愿继续执行吗?[Y/n]apache

这样就一目了然了,比Freebsd的port安装还要一目了然,呵呵。ubuntu

  因为关系包通常都不少.ui

往后想卸载却又忘记关系包的名字,
能够事先作个记录.
apt-get build-dep pidgin | tee pidgin-b-d.log
这样就不会忘记了.spa

 


 

build-essential - Google Search.net

linux - What are "build-essential" & "build-dep"? - Super User  https://superuser.com/questions/151557/what-are-build-essential-build-depcode

"build-essential" contains tools (like the gcc compiler, make tool, etc) for compiling/building software from source. So you start with (usually C) source files and create executables from them.

 

Ubuntu的build-essential有什么做用 - yzpbright的博客 - CSDN博客  https://blog.csdn.net/yzpbright/article/details/81515459

Ubuntu缺省状况下,并无提供C/C++的编译环境,所以还须要手动安装。可是若是单独安装gcc以及g++比较麻烦,幸运的是,Ubuntu提供了一个build-essential软件包。查看该软件包的依赖关系:

y@ubuntu:~$ apt-cache depends build-essential
build-essential
 |Depends: libc6-dev
  Depends: <libc-dev>
    libc6-dev
  Depends: gcc
  Depends: g++
  Depends: make
    make-guile
  Depends: dpkg-dev

也就是说,安装了该软件包,编译c/c++所须要的软件包也都会被安装。所以若是想在Ubuntu中编译c/c++程序,只须要安装该软件包就能够了。

安装方法以下:

相关文章
相关标签/搜索