"make install"复制了哪些文件,在哪里复制? [英] What files did `make install` copy, and where?

查看:371
本文介绍了"make install"复制了哪些文件,在哪里复制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以获取make install复制到文件系统的文件名/路径列表?有些软件包带有MANIFEST文件,但没有与我一起使用的软件包.

Is there a way to get a list of filenames/paths that make install copies to the filesystem? Some packages come with a MANIFEST file, but not the ones that I am working with.

推荐答案

最简单的方法是使用chroot:在chroot监狱中运行"make install";计算安装前的文件列表,并将其与安装后的文件列表进行比较.

The most fool-proof way is to use chroot: have "make install" run inside a chroot jail; compute a list of the files that you had before the installation, and compare that to the list of files after the installation.

许多安装将支持--prefix配置选项和/或DESTDIR环境变量.您可以将它们用于chroot的较轻等待版本(如果您以相当无特权的用户身份运行安装,请相信如果尝试写入到这些位置之外的位置,安装将失败).

Many installations will support either a --prefix configuration option, and/or a DESTDIR environment variable. You can use those for a lighter-wait version of chroot (trusting that the installation will fail if it tries to write to a location outside these if you run installation as a fairly unprivileged user).

另一种方法是替换安装程序.许多软件包都支持INSTALL环境变量,该变量就是要使用的安装程序.有安装的跟踪版本.

Another approach is to replace the install program. Many packages support an INSTALL environment variable that, well, is the install program to use; there are tracing versions of install around.

这篇关于"make install"复制了哪些文件,在哪里复制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆