pkg-configでパッケージが見つかりません

pkg-configでパッケージが見つかりません

最新バージョンのpkg-configを使用する必要があります。だからsourceからビルドしました--with-internal-glib --disable-host-tool

ただし、PKG_CONFIG_PATHを設定しないと、パッケージが見つかりません。インストールされているシステムなど、すべてのデフォルトパスを含めるにはどうすればよいですか?

ベストアンサー1

autoconfthenを使用してソースからビルドすると仮定すると、./configure --help構成変数があります。

  --with-pc-path          default search path for .pc files

マニュアルページの説明に従って、システムにインストールされているバージョンの検索パスを見つけることができます。

  pc_path
          The default search path used by pkg-config  when  searching  for
          .pc files. This can be used in a query for the pkg-config module
          itself itself:
            $ pkg-config --variable pc_path pkg-config

前任者。

$ /usr/bin/pkg-config --variable pc_path pkg-config
/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

次に、結果を設定コマンドにコピーします。

make clean

./configure --with-internal-glib --disable-host-tool \
  --with-pc-path=/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

make

おすすめ記事