【问题标题】:pkg-config --version always gives 0.26pkg-config --version 总是给出 0.26
【发布时间】:2013-04-22 06:36:59
【问题描述】:

所以,正在阅读有关 pkg-config 的信息(我认为它默认包含在我正在使用的 Debian 上)。但是每次我试图找到某个东西的版本时,它都会给我 0.26。

santeyio@Amadeus:/$ pkg-config --version python
0.26
santeyio@Amadeus:/$ pkg-config --version libre-office
0.26
santeyio@Amadeus:/$ pkg-config --version alsdkfj
0.26
santeyio@Amadeus:/$ pkg-config --version firefox
0.26
santeyio@Amadeus:/$ 

所以,我尝试 sudo apt-get 删除它,然后重新安装。但我得到相同的结果。我知道我在这里遗漏了一些愚蠢的东西......谁能指出我正确的方向?

这是我重新安装的输出,如果有帮助的话...

santeyio@Amadeus:/$ sudo apt-get install pkg-config
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
calligra-l10n-engb cdparanoia comerr-dev k3b k3b-data k3b-i18n kdevelop-php-docs-l10n
kdevelop-php-l10n krb5-multidev language-pack-kde-en libasprintf0c2:i386 libcroco3:i386
libgcrypt11-dev libgnutls-dev libgnutls-openssl27 libgnutlsxx27 libgomp1:i386 libgpg-error-dev
libgssrpc4 libk3b6 libkadm5clnt-mit8 libkadm5srv-mit8 libkcddb4 libkdb5-6 libkrb5-dev libldap2-dev
libp11-kit-dev librtmp-dev libtasn1-3-dev linux-headers-3.5.0-17 postgresql-client-9.2
postgresql-common python-xkit screen-resolution-extra
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
pkg-config
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 41.3 kB of archives.
After this operation, 136 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ quantal/main pkg-config amd64 0.26-1ubuntu2 [41.3 kB]
Fetched 41.3 kB in 0s (66.2 kB/s)   
Selecting previously unselected package pkg-config.
(Reading database ... 247983 files and directories currently installed.)
Unpacking pkg-config (from .../pkg-config_0.26-1ubuntu2_amd64.deb) ...
Processing triggers for man-db ...
Setting up pkg-config (0.26-1ubuntu2) ...

【问题讨论】:

    标签: pkg-config


    【解决方案1】:

    使用--modversion

    $ pkg-config --modversion python
    2.7
    

    pkg-config 是在针对库进行编译时使用的——如果您要检查包的版本,请使用dpkg -s

    $ dpkg -s firefox
    Package: firefox
    Status: install ok installed
    Priority: optional
    Section: web
    Installed-Size: 48531
    Maintainer: Ubuntu Mozilla Team <ubuntu-mozillateam@lists.ubuntu.com>
    Architecture: amd64
    Version: 17.0.1+build1-0ubuntu0.12.04.1
    

    apt-cache policy

    $ apt-cache policy firefox
    firefox:
      Installed: 17.0.1+build1-0ubuntu0.12.04.1
      Candidate: 20.0+build1-0ubuntu0.12.04.3
    ...
    

    【讨论】:

    • 你知道,我可以如何添加到 pkg-config 路径吗?是否有我正在编辑的文件?
    • 你想做什么?
    • 没关系,在这里找到了答案。 people.freedesktop.org/~dbn/pkg-config-guide.html
    • 嗯,我对我目前正在尝试做的事情有点困惑,哈哈。最初我试图编译一个开源项目(ardour),所以我正在安装依赖项,然后我发现这些依赖项有依赖项,我整个晚上都在沿着兔子小径走。所以......以某种方式弄清楚 pkg-config 成为我现在正在做的事情。 :P
    • 我想问如何更改 pkg-config 路径是一个糟糕的问题……它有点暴露了我对自己在做什么的无知,哈哈。那好吧。我上面链接的网页开始为我整理一下。
    猜你喜欢
    • 1970-01-01
    • 2012-08-29
    • 1970-01-01
    • 1970-01-01
    • 2020-08-27
    • 2015-01-05
    • 1970-01-01
    • 2013-12-23
    • 1970-01-01
    相关资源
    最近更新 更多