现在的位置: 首页 > 综合 > 正文

Linux 软件包安装方法

2013年09月16日 ⁄ 综合 ⁄ 共 752字 ⁄ 字号 评论关闭

The installation needs to be faked, so that the package thinks that it is installed in /usr though in reality it is installed in the /usr/pkg hierarchy. Installing in this manner is not usually a trivial task. For example, consider that you are installing a package libfoo-1.1. The following instructions may not install the package properly:

./configure --prefix=/usr/pkg/libfoo/1.1

make

make install

The installation will work, but the dependent packages may not link to libfoo as you would expect. If you compile a package that links against libfoo, you may notice that it is linked to /usr/pkg/libfoo/1.1/lib/libfoo.so.1 instead of /usr/lib/libfoo.so.1 as you would expect. The correct approach is to use the DESTDIR strategy to fake installation of the package. This approach works as follows:

./configure --prefix=/usr

make

make DESTDIR=/usr/pkg/libfoo/1.1 install

抱歉!评论已关闭.