使用PCRE库部署Ç应用 [英] Deploying C app that uses the PCRE library
问题描述
我写一个使用PCRE库一个C程序。一切正常,我自己的电脑上。然而,当我在复制二进制到另一台计算机并运行它,它提供了以下错误:
I wrote a C app that uses the PCRE library. Everything works on my own computer. However, when I copy the binary over to another computer and run it, it gives the following error:
/libexec/ld-elf.so.1:共享对象libpcre.so.0未找到,以MyApp的
/libexec/ld-elf.so.1: Shared object "libpcre.so.0" not found, required by "myapp"
我知道我大概可以得到它在目标计算机上安装PCRE LIB工作。但是,我不知道是否有这样做的更便捷的途径? (只是复制了几个LIB文件?)
I know I can probably get it to work by installing the PCRE lib on the target computer. However, I'm wondering if there's a more convenient way of doing this? (just copying over a few lib files?)
我尝试过libpcre.so.0文件复制,但没有奏效。
I tried to copy over the libpcre.so.0 file, but it didn't work.
任何帮助AP preciated!
谢谢,
Any help is appreciated! Thanks,
推荐答案
这是更好地无论是安装还是静态链接。前者当然,是在资源打火机。为了保证兼容性将是建立包目标系统的最佳方式,并指定所有的依赖关系(依赖于分布,当然)。
It's better to either install it or link it in statically. The former, of course, is lighter on resources. The best way to ensure compatibility would be to build the package for target system, specifying all dependencies (depends on the distribution, of coursE).
这篇关于使用PCRE库部署Ç应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!