web-dev-qa-db-ja.com

パッケージ「libxml-2.0」が見つかりません

https://wiki.documentfoundation.org/DLP/Libraries/libvisio から私のmac OS xにlibvisioを追加しようとしています

以下に記載されているすべての依存関係を追加しました:

boost
gperf
icu
librevenge
libxml2
Perl
doxygen

依存関係を追加した後、以下のコマンドを実行しようとしています。

$ ./autogen.sh ''# only needed for building from git''
$ ./configure
$ make
$ make install

しかし、2番目のコマンド$ ./configureで問題が発生しました

ベローエラーが発生します。

configure: error: Package requirements (
    libxml-2.0
) were not met:

No package 'libxml-2.0' 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 LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

$ brew install libxmlでlibxml2をインストールしようとしましたが、Warning: libxml2-2.9.3 already installedと表示されます。

OS X 10.11.4を使用しています

誰かが私を助けてくれますか?ありがとう

13
Rohan

したがって、brewでlibxml2がすでにインストールされています。 brewがlibxml2をインストールすると、次のように通知されます。

margold@home-macbook ~ $ brew install libxml2
(...)
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/libxml2/lib
    CPPFLAGS: -I/usr/local/opt/libxml2/include
(...)

これは、brewがlibxml2を/ usr/local/libおよび/ usr/local/includeにシンボリックリンクしておらず、そこにもpkg-configファイルをリンクしていない可能性があるため、libvisioがそれを見つけられない理由です。

したがって、brewとlibvisioが次のように指示するように、./configureを実行するときにlibxml2の場所を指定する必要があります。

./configure LIBXML_CFLAGS=-I/usr/local/opt/libxml2/include LIBXML_LIBS=-L/usr/local/opt/libxml2/lib

(システム上のパスは異なる場合があるので、確認してください!)

これを解決する他の方法:

  • brewでlibvisioを直接インストール
  • libxmlのinlcude/lib/、およびpkg-configファイルを/usr/local/にシンボリックリンクします
3
margold

これは私が醸造していなかったのでうまくいくはずです:

yum install libxml2-devel
9
Tushar

Ubuntuの場合、次のことが役に立ちました

apt-get install libxml2-dev

5
Xolani

パッケージ「libxml-2.0」が見つかりません

"/usr/lib/pkgconfig/libxml-2.0.pc"がないことを意味します。通常、libxml2開発ファイルにあります。 「libxml2-devel」のように?


0
Knud Larsen