美文网首页
在ubuntu中使用apt-get工具遇到的*-dev与不带de

在ubuntu中使用apt-get工具遇到的*-dev与不带de

作者: an0nym0us | 来源:发表于2017-07-03 10:43 被阅读66次

    参考stack overflow上的答案:https://stackoverflow.com/questions/1157192/what-do-the-dev-packages-in-the-linux-package-repositories-actually-contain

    赞同比较多的:

    The -dev packages most often contain the headers related to a library's interface. Next most common are package-config files (.pc) describing build options and staticly linked libraries.
    In general, if you want to know the contents of a package you have installed, dpkg -L pkgname will get you that. The apt-file program can tell you the same for any package in the repositories.
    Note, also, that the answers by William Pursell and caf contain useful additional details. If you find their input helpful, do upvote it.

    还有这个:

    One more item in the -dev package is the /usr/lib/lib.so link.
    The libfoo0 package will install the file /usr/lib/libfoo.so.0.0, while libfoo-dev installs the links /usr/lib/libfoo.so.0 and /usr/lib/libfoo.so. This is the mechanism that allows you to have libfoo0 and libfoo1 installed simultaneously, so that software requiring the old library can co-exist on the box with software using the new library. When you install libfoo-dev, any software that is compiled will follow the *.so link and link against the version of the library referenced by that link.

    以一个普通ubuntu用户的角度,我理解就是如果我要安装显卡驱动啥的,或者一些工具,比如图片浏览器,那就不用安装带-dev的。

    如果我编译某个库,比如nginx,它提示缺少了ssl的系列头文件,那么我就去安装那种带-dev的包。(这个可能是个不确切的例子。)

    相关文章

      网友评论

          本文标题:在ubuntu中使用apt-get工具遇到的*-dev与不带de

          本文链接:https://www.haomeiwen.com/subject/qnsacxtx.html