尝试安装时遇到一个奇怪的问题dev-lib/gobject-introspection
:
>>> Emerging (1 of 9) dev-libs/gobject-introspection-1.42.0
......
configure: error: Package requirements (glib-2.0 > 2.36.0) were not met:
No package `glib-2.0` found
Run Code Online (Sandbox Code Playgroud)
我已经dev-libs/glib-2.42.1
安装了,但是有一些奇怪的问题pkg-config
:
$ pkg-config --modversion glib-2.0
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc`
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found
$ echo $PKG_CONFIG_PATH
$
Run Code Online (Sandbox Code Playgroud)
看起来好像没有glib-2.0.pc
文件/usr/lib/pkgconfig
。有该文件/usr/lib32/pkgconfig/glib-2.0.pc
,但对于以前版本的 glib-2.38.2
任何人都可以向我解释,什么可能是错的,如何解决这个问题?我已经在gentoo 论坛上问过这个问题,但也许我会在这里有更好的运气。
我正在尝试在 R 中安装 openssl,使用install.packages('openssl')
,但我收到一条错误消息:
* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
Found pkg-config cflags and libs!
Using PKG_CFLAGS=
Using PKG_LIBS=-lssl -lcrypto -ldl -lz
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because openssl was not found. Try installing:
* deb: libssl-dev (Debian, Ubuntu, etc)
* rpm: openssl-devel (Fedora, CentOS, RHEL)
* csw: libssl_dev (Solaris)
* brew: openssl (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and …
Run Code Online (Sandbox Code Playgroud) 似乎 FreeBSD 端口树正忙于从 pkg-config 过渡到 pkgconf。http://www.mail-archive.com/freebsd-ports-announce@freebsd.org/msg00018.html
作为最终用户,我首先认为这不会影响我,并且像 portmaster 这样的工具会处理任何过渡。然而今天,常规portmaster -a
给出了以下问题:
sudo portmaster -a
===>>> Gathering distinfo list for installed ports
===>>> Starting check of installed ports for available updates
===>>> The devel/pkg-config port moved to devel/pkgconf
===>>> Reason: pkg-config has been replace by pkgconf
===>>> Launching child to reinstall pkg-config-0.25_1
===>>> All >> pkg-config-0.25_1 (1/1)
===>>> The devel/pkg-config port moved to devel/pkgconf
===>>> Reason: pkg-config has been replace by pkgconf
===>>> Port directory: /usr/ports/devel/pkgconf
===>>> Launching 'make …
Run Code Online (Sandbox Code Playgroud) 我正在 Redhat Linux Nash 4.x 系统上安装 FireFox 3.6 所需的库。
我已经成功安装了 glib2.12.0 库,但是当我 ./configure atk 1.9.0 库时,出现以下错误。
checking for pkg-config... /usr/bin/pkg-config
checking for GLIB - version >= 2.5.7... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error:
*** GLIB 2.5.7 or better is required. The latest version of
*** GLIB is …
Run Code Online (Sandbox Code Playgroud) 我通过 apt 安装了一个库,但它没有向 pkg-config 目录添加 .pc 文件。当我手动构建另一个时,它被添加了。是否有自动创建 .pc 文件的 libs 约定,如果是这样,何时以及如何完成?
我已经从 12.04 升级了 Ubuntu 14.04,进行了 dist-upgrades。以前做过很多手动安装,比如ffmpeg、libglib等。我现在有一个不错的自定义发行版,它运行良好,但是在尝试编译应用程序时遇到了问题。它源于手动安装的源代码包和本机发行版库之间的库冲突。一个人建议我重命名/usr/local
它,但在下次重新启动时启动失败。
当我查找由pkg-config
with添加的目录时
pkg-config --variable pc_path pkg-config
Run Code Online (Sandbox Code Playgroud)
它列出
/usr/local/lib/i386-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
Run Code Online (Sandbox Code Playgroud)
我不希望它寻找路径 /usr/local/lib...
我怎样才能禁止那些不让pkg-config
寻找的路径?
我正在尝试从源代码构建 btrfs-progs,但是当我运行 ./configure 时出现错误:
checking for BLKID... no
configure: error: Package requirements (blkid) were not met:
No package 'blkid' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables BLKID_CFLAGS
and BLKID_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Run Code Online (Sandbox Code Playgroud)
blkid
安装在/sbin
所以,大概,它的所有库都在默认位置。
我需要做什么来告诉 pkg-config 在哪里blkid
或我实际上是否缺少一个包?
仅供参考:我正在运行带有 4.1.0 内核的 Debian 8(sid/unstable),该内核是大约一周前从 github.com/torvalds/linux.git 来源构建的(提交:g6aaf0da)。
我最近经历了一段痛苦的时光,只是试图编译几个 C 程序,因为我找不到库所在的位置,而且 pkg-config 似乎有问题。
我像这样安装了 GNU GSL:
wget ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz
tar xvzf gsl-*gz
cd gsl-1.15
./configure
make
sudo make install
Run Code Online (Sandbox Code Playgroud)
显然它安装在/usr/local/lib
哪个非标准的地方?(1)什么是标准场所?(2)我如何让它安装在那里?
而且我无法编译一个使用这个库的简单程序:
$ gcc gsl_erf.c -o gsl -I/usr/local/lib -L/usr/local/lib
/tmp/cc3WD9Zq.o: In function `main':
gsl_erf.c:(.text+0x24): undefined reference to `gsl_cdf_gaussian_P'
collect2: error: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)
现在,使用 pkg-config :
pkg-config --libs --cflags gslPackage gsl was not found in the pkg-config search path.
Perhaps you should add the directory containing `gsl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gsl' found …
Run Code Online (Sandbox Code Playgroud) 我按照 GTK 上的教程使用此命令生成构建标志:
$ pkg-config --cflags --libs gtk+-3.0
Run Code Online (Sandbox Code Playgroud)
这将输出相干标志。从研究中,我发现在、、等价物以及变量指示的文件夹中pkg-config
搜索.pc
文件。/usr/lib/pkginfo
usr/share/pkgconfig
/local
PKG_CONFIG_PATH
没有一个文件夹包含 GTK 文件,并且没有设置环境变量。从哪里pkg-config
获得旗帜?
我想构建一些软件的版本,该版本比当前作为稳定版本 Debian 软件包提供的版本更新。
然而,为了做到这一点,除了使用更新版本的源代码之外,我还想尽可能严格地遵循用于在稳定版本中为此软件构建 Debian 软件包的构建过程。
至少,我想在构建过程中为相关环境变量指定相同的配置标志和相同的值,就像对该软件的稳定版本 Debian 软件包所做的那样。
问:如何找到特定(稳定版本)Debian 软件包的构建过程?