1

Mac を使用しており、データをosm2pgsqlにインポートするためにインストールしたいと考えています。OSMPostgreSQL

ターミナルで実行brew install osm2pgsqlします。(私はすでに実行しましたbrew update)。

出力は次のとおりです。

==> Downloading https://github.com/openstreetmap/osm2pgsql/archive/v0.82.0.zip
Already downloaded: /Library/Caches/Homebrew/osm2pgsql-0.82.0.zip
==> ./autogen.sh
==> ./configure --with-proj=/usr/local/opt/proj
checking for fork... yes
checking for xml2-config... /usr/bin/xml2-config
checking for xml2 libraries... yes
checking for zlib compression library... no
configure: error: required library not found

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

そして、これが実行の出力ですbrew doctor

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libMonoPosixHelper.dylib
    /usr/local/lib/libSFFileMonitor.32.dylib
    /usr/local/lib/libSFIPC.32.dylib
    /usr/local/lib/libSFIPC.I.dylib
    /usr/local/lib/libSFsqlite3.7.4.dylib
    /usr/local/lib/libSFSyncEngine.I.dylib

これらの dylib がわかりません。削除する必要がありますか?

linstall するにはどうすればよいosm2pgsqlですか?

または、あきらめてosm2pgsql他のツールを使用してOSMデータをにインポートする必要がありPostgreSQLますか?

[編集1]

http://www.zlib.net/によると、zlib はすでに Mac OS X の一部として含まれています。

そして、Googleで検索すると、これhttps://github.com/josegonzalez/homebrew-php/issues/205とこれhttps://github.com/josegonzalez/homebrew-php/issues/538が見つかりました

そこで、次の 2 つのコマンドを実行します。

brew tap homebrew/dupes
brew install zlib

結果出力は次のとおりです。

==> Downloading http://zlib.net/zlib-1.2.8.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/zlib/1.2.8
==> make install
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.

Mac 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/zlib/lib
    CPPFLAGS: -I/usr/local/opt/zlib/include

==> Summary

zlib をインストールする必要はないようです。

もう一度実行brew install osm2pgsqlしますが、それでも機能しません。

[編集2]

homebrew をあきらめて、osm2pgsql をバイナリ インストーラー経由でインストールします。

参考までに:
http://wiki.openstreetmap.org/wiki/Osm2pgsql#Binary_Installer https://github.com/openstreetmap/osm2pgsql/issues/15

4

3 に答える 3

1

私は何も知りませんがbrew、エラーメッセージによると、zlibライブラリがありません。まずはインストールしてみてください。

またosm2pgsql、これは OSM データを PostgreSQL データベースにインポートするための標準ツールであるため、従う必要があります。

于 2013-08-20T06:40:22.983 に答える
0

次のコマンドを使用して式を編集する必要があります。

brew edit <formula_name>

次に、brew env で必要なエクスポートを作成する必要があります。これを行うのに最適な場所は、install 関数の呼び出しの直前です。

system "./configure", *args

追加する行は次のとおりです

ENV.append 'LDFLAGS', "-L/usr/local/opt/zlib/lib"
ENV.append 'CPPFLAGS', "-I/usr/local/opt/zlib/include"

完了したら、brew のインストールを再度実行するだけで機能します。

于 2014-05-15T18:58:29.723 に答える
0

Mac OS X Mavericks でも実行されていなかったため、式を編集しました。インストールが成功した要点を参照してください。

https://gist.github.com/christoph-buente/e18584e312bcadfe82e5

そして、自作リポジトリにプルリクエストを提出しました。うまくいけば、それはマージされます:

https://github.com/Homebrew/homebrew/pull/29862

于 2014-06-04T09:37:13.863 に答える