首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >"brew安装osm2pgsql“失败

"brew安装osm2pgsql“失败
EN

Stack Overflow用户
提问于 2013-08-20 01:21:31
回答 3查看 1.1K关注 0票数 1

我使用mac,并希望安装osm2pgsqlOSM数据导入PostgreSQL

我在终端执行brew install osm2pgsql。(我已经执行了brew update)。

这是输出:

代码语言:javascript
复制
==> 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的输出

代码语言:javascript
复制
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

我不认识这些女同性恋,我应该把它们删除吗?

我该如何安装osm2pgsql

还是应该放弃osm2pgsql,使用其他工具将OSM数据导入PostgreSQL

编辑1

根据http://www.zlib.net/的说法,zlib已经包含在Mac中。

当我在谷歌搜索它时,我发现了这个https://github.com/josegonzalez/homebrew-php/issues/205和这个https://github.com/josegonzalez/homebrew-php/issues/538

因此,我执行以下两个命令:

代码语言:javascript
复制
brew tap homebrew/dupes
brew install zlib

其结果是:

代码语言:javascript
复制
==> 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

我放弃自制,通过二进制安装程序安装osm2pgsql。

FYI:

Installer https://github.com/openstreetmap/osm2pgsql/issues/15

EN

回答 3

Stack Overflow用户

发布于 2013-08-20 06:40:22

我对brew一无所知,但是根据错误消息,您缺少了zlib库。试着先安装。

您应该坚持使用osm2pgsql,因为它是将OSM数据导入PostgreSQL数据库的标准工具。

票数 1
EN

Stack Overflow用户

发布于 2014-05-15 18:58:29

您必须使用以下命令编辑公式:

代码语言:javascript
复制
brew edit <formula_name>

然后,您必须在brew env中进行所需的导出,最好的地方是在调用

代码语言:javascript
复制
system "./configure", *args

下面是要附加的行

代码语言:javascript
复制
ENV.append 'LDFLAGS', "-L/usr/local/opt/zlib/lib"
ENV.append 'CPPFLAGS', "-I/usr/local/opt/zlib/include"

当它完成后,您只需再次运行brew安装就可以了。

票数 0
EN

Stack Overflow用户

发布于 2014-06-04 09:37:13

我编辑了公式,因为它也没有运行在Mac小牛上。请参阅使其安装成功的要点。

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

我向自制存储库提交了一个请求。希望它能被合并:

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18325542

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档