【发布时间】:2018-01-25 22:57:15
【问题描述】:
我正在尝试从 MakeFile 构建 SWUpdater,但是在构建时出现错误
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
Package lua was not found in the pkg-config search path.
Perhaps you should add the directory containing `lua.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lua' found
make: 'Makefile' is up to date.
根据我在网上阅读的内容,此错误告诉我的是,当系统正在查找 SWUpdate 所依赖的所有文件时,它无法在 @987654323 的任何地方找到 lua.pc 文件@ 看起来。
我查看了usr/lib/pkgconfig 并在该目录中找到了lu50.pc 和lualib50.pc 文件。我查看了 package configure-er 使用的位置
pkg-config --variable pc_path pkg-config
这告诉我它看起来在/usr/lib/pkgconfig 等其他地方。我看到其他人提到您可以检查PKG_CONFIG_PATH 变量以查看其设置。我检查了它是空白的,所以我想我只需将路径设置为/usr/lib/pkgconfig
export PKG_CONFIG_PATH=/usr/lin/pkgconfig
我检查了路径,并再次运行make 命令,但出现了同样的错误。
作为解决此问题的最后努力,我将lua50.pc 和lualib50.pc 文件移动到包configure-er 路径中列出的另一个目录,以查看是否有帮助,但发生了同样的错误,所以我将它们移回原来的位置。
所以我的主要问题是:为什么 package configure-er 没有找到 lua50.pc 文件,尽管它在正确的目录中查找?
编辑:我设法通过简单地将lua50.pc 重命名为lua.pc 来解决这些错误,这让我相信它找不到它的原因是因为它确实在寻找对于名为 lua.pc 的文件,而不是一般的 lua pc 文件。除此之外,我的问题仍然存在,因为我有一种直觉认为这不是一个长期可行的解决方案。
【问题讨论】:
标签: linux makefile lua pkg-config