将 Debian 软件包与从源代码安装的库结合起来
在我的 Linux (Ubuntu 11.04) 开发机器上。我经常需要从源代码安装库。这总是给我带来问题,因为包管理器在检查依赖项时不会考虑从源安装的包。这使得包管理器对我来说毫无价值,因为一旦我从源代码安装了一组库(特别是如果它们对 gnome 环境,即 gstreamer 至关重要),我就永远无法再次使用它,而不用混合依赖项搞砸我的整个发行版。在我看来,使用 pkg-config 检查依赖关系相对简单,而不必担心 deb 数据库。我不介意在这里写一些代码。有人有什么想法吗?
On my linux (Ubuntu 11.04) development machine. I often need to install libraries from source. This always causes problems for me because the package manager doesn't consider packages installed from source when it checks dependencies. This makes the package manager worthless to me since once I install one set of libs from source (especially if they are vital to the gnome environment i.e. gstreamer), I can never use it again without screwing up my entire distro with mixed dependencies. It seems to me that it would be relatively simple to check the dependencies with pkg-config without having to worry with the deb database. I don't mind writing a little code here. Does anyone have any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
或者,您应该查看
equivs
软件包,该软件包的目的正是为了创建空的 .debs,这将使 apt/dpkg 认为某个软件包已安装,而实际上并未安装。Alternatively, you should look into the
equivs
package, which is made exactly for the purpose of creating empty .debs that will make apt/dpkg think a certain package is installed when it isn't.从 Debian stable 获取源包,并使用开发人员工具从中构建 .deb。如果您需要更新的上游版本,您可以将 Debian 源代码的 .diff.gz 部分应用到上游 tarball 中,并获得一个有良好工作机会的构建基础架构。如果没有,我确信软件包维护者会很高兴提供补丁以使其与新的上游版本一起工作。
Grab the source package from Debian unstable and build a .deb from that using the developer tools. If you need an even newer upstream version, you can apply the .diff.gz part of the Debian source to an upstream tarball and get a build infrastructure that has good chances of working. If if doesn't, I'm sure the package maintainer would appreciate patches to make it work with the new upstream version.
另一种选择是 checkinstall。它会创建一个包含依赖项信息的 .deb 包,但您也可以通过包管理来卸载它。
Another option would be checkinstall. It creates a .deb package containing dependency information, but also you will be able to uninstall it via package management.