Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 找不到pkg配置错误_Linux_Macos - Fatal编程技术网

Linux 找不到pkg配置错误

Linux 找不到pkg配置错误,linux,macos,Linux,Macos,我正试图在我的mac电脑上安装一些软件;但是,我一直收到相同的错误: configure: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the envi

我正试图在我的mac电脑上安装一些软件;但是,我一直收到相同的错误:

configure: error: The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables XMEDCON_GLIB_CFLAGS
and XMEDCON_GLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See `config.log' for more details
这就是我放置pkg config的地方。尽管每次尝试使用./configure配置文件时,我都会不断收到错误。任何帮助都将不胜感激

对我的问题的回答(在几次谷歌搜索之后)揭示了以下几点:

$ curl https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.tar.gz -o pkgconfig.tgz
$ tar -zxf pkgconfig.tgz && cd pkg-config-0.29
$ ./configure && make install
从以下链接:

感谢大家的评论,并为我对linux/OSX的无知感到抱歉


执行此操作修复了上述问题。

如果出现此错误:

configure: error: Either a previously installed pkg-config or "glib-2.0 >= 2.16" could not be found. Please set GLIB_CFLAGS and GLIB_LIBS to the correct values or pass --with-internal-glib to configure to use the bundled copy.
而不是执行此命令:

$ ./configure && make install
这样做:

./configure --with-internal-glib && make install
对于Ubuntu/Debian操作系统

apt get install-y pkg config

对于Redhat/Yum OS

yum安装-y pkgconfig

对于Linux操作系统

pacman-S pkgconf

对我来说,(OSX)通过以下操作解决了问题:

brew install pkg-config
试一试

  • 哪个软件包配置
  • 如果它是空的,那么就开火
  • brew安装程序包配置
  • 或:ruby-e“$(curl-fsSL)”/dev/null

导出路径=$PATH:/opt/local/bin中缺少冒号。这假定
/opt/local/bin/pkg config
存在,并且是您想要的版本。我对输入错误表示歉意。问题是,在终端中键入此命令,然后执行./configure命令后,我仍然收到此错误。关于可能出现的问题有什么想法吗?
which pkg config
的输出是什么?“/opt/local/bin/pkgconfig/bin/pkg config”是我在路径设置为/opt/local/bin/pkgconfig/bin时得到的结果,在Ubuntu 12.04上运行这些命令会出现错误:
configure:error:以前安装的pkg配置或“glib-2.0>=2.16”找不到。请将GLIB_CFLAGS和GLIB_LIBS设置为正确的值,或通过内部GLIB配置使用捆绑副本。
对于ubuntu,您可以使用
sudo-apt-get-install-pkg-config安装它
这在ubuntu 14.04.6 LTS上运行,如果您想要0.29而不是默认的0.26(太旧,无法交叉编译ffmpeg)。嗨,我在安装“symbol not found for architecture x86_64”时出现了这个错误。版本0.29.2已经修复了这个问题。请注意,这个问题是关于osx的。虽然谷歌仍然在ubuntu上使用浏览器,但它让我来到了这里。软件包管理器胜过在不安全的连接上运行任意代码
curl
ed,正如公认的答案所示。@AliSeyedi+1:问题是关于OSX的。我敢肯定,大多数Linux用户都知道如何安装软件包。这在Mac上并不明显。当我在Ubuntu上执行该命令时,它需要root权限,即-
sudo apt get install-y pkg config
(我认为值得一提)。
brew install pkg-config