问题描述
更新系统库时,我有些担心.例如,我为依赖libssl-dev> 0.5的自定义lib(即libhell
,没有此库)创建了make && make install
.然后apt为我提供了更新libssl-dev
的方法.我应该针对新的libssl-dev
重建libhell
吗?
I have some fear when i update my system libraries. For example, i made make && make install
for a custom lib (i.e. libhell
, there is no this library in repo) that depends on libssl-dev>0.5. Then apt offers me to update libssl-dev
. Should i rebuild libhell
against new libssl-dev
?
它在更新后无需重新构建就可以正常工作,但是二进制安全性如何?我一直在bin-dist系统上构建自己的程序包,我一直感觉自己做错了...
Always it worked fine after updates and without rebuilds, but what about binary safety? All the time i build own packages on bin-dist systems i feel i'm doing something wrong...
推荐答案
这就是存在打包系统的原因.
This is why package systems exist.
如果您的libhell
二进制库是动态库(这是一个libhell.so
共享对象,具有位置无关的代码),并且依赖项libssl-dev
没有更改其API(例如,其版本号未更改)更改),则无需重新编译并重新安装libhell
.
If your libhell
binary library is dynamic library (that is a libhell.so
shared object, with position independent code) and if the dependency libssl-dev
didn't change its API (e.g. if its version number didn't change), then you don't need to recompile and reinstall your libhell
.
如果您认为libhell
依赖于已更改的libssl-dev
功能(或数据),则应重新编译它.
If you feel that your libhell
depends upon a changed feature (or data) of libssl-dev
then you should recompile it.
重新编译libhell
的次数比需要的时间要好.
Better recompile your libhell
more often than needed.
另请参见程序库的使用方法
这篇关于系统更新后,我应该重建一个依赖库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!